Search found 20 matches

by sandy007smarty
Sat Dec 29, 2007 8:38 pm
Forum: Other words
Topic: Contest of Newbies 2007
Replies: 9
Views: 3903

Any hints for problem B, Arranging a Contest?
I am getting TLE. I am basically doing a pruned DFS.
by sandy007smarty
Thu Sep 13, 2007 8:06 pm
Forum: Volume 6 (600-699)
Topic: 681 - Convex Hull Finding
Replies: 60
Views: 20209

Hello, I think more than one points may be repeated. If you are trying to construct the hull just by going around the edges of the given polygon and checking for correct turns then try the following case. input: 1 9 0 0 1 2 2 1 1 1 2 0 3 1 3 3 0 3 0 0 output: 1 6 0 0 2 0 3 1 3 3 0 3 0 0 Fahim Thank...
by sandy007smarty
Fri Aug 31, 2007 2:18 am
Forum: Volume 1 (100-199)
Topic: 112 - Tree Summing
Replies: 137
Views: 13253

I just got AC with my same old code. I don't know why it give WA earlier. May be I submitted the wrong version.

BTW, for the test case:

Code: Select all

0 ()
my AC code prints:

Code: Select all

no
by sandy007smarty
Fri Aug 31, 2007 2:11 am
Forum: Volume 1 (100-199)
Topic: 112 - Tree Summing
Replies: 137
Views: 13253

My program gives the same output as given above for all cases, except for the last 2 cases, which as specified above are not valid inputs:- 5 ( 5 () 1 () ()) 4 ( 2 (2 () 1()()) ()) But I am still getting WA :( What should be the output for: 0 () BTW, I have submitted my code by printing both yes and...
by sandy007smarty
Mon Aug 20, 2007 6:37 pm
Forum: Volume 5 (500-599)
Topic: 562 - Dividing coins
Replies: 73
Views: 29566

The value of a coin varies from 1 cent to 500 cents.
Yes. But Minilek was talking about the case when there are 0 coins and not about a coin with value of 0 cents.
by sandy007smarty
Sun Apr 08, 2007 8:55 pm
Forum: Volume 108 (10800-10899)
Topic: 10820 - Send a Table
Replies: 34
Views: 14129

@sclo: 1. Is their some faster sieve algo? Can you provide some links? 2. Calculating result +=result[i-1]+result <<1 and just printing result[n] seems similar to what you suggest. I can't see what computational advantages your method has. Below is my code for calculating totient using sieve:- for(i...
by sandy007smarty
Sun Apr 08, 2007 7:50 pm
Forum: Volume 109 (10900-10999)
Topic: 10964 - Strange Planet
Replies: 13
Views: 6175

Thanx. I am already following it now.
by sandy007smarty
Sun Apr 08, 2007 7:49 pm
Forum: Other words
Topic: how is the memory used decided?
Replies: 3
Views: 2978

That sounds strange...
by sandy007smarty
Sat Apr 07, 2007 7:28 pm
Forum: Volume 1 (100-199)
Topic: 104 - Arbitrage
Replies: 223
Views: 13070

@gits:
I got AC, but I have this doubt.
tmp = best[k][steps-1] * best[k][j][1]

I feel the above statement should be:-

Code: Select all

best[i][k][steps-m]*best[k][j][m]
and m should vary from 1 to steps-1 (making the solution O(n^5)).

But why is it not required? Why is just calculating for m=1 enough?
by sandy007smarty
Sun Feb 11, 2007 11:04 pm
Forum: General
Topic: Invitation to Codecraft 2007 - Online Programming Contest
Replies: 1
Views: 2398

Invitation to Codecraft 2007 - Online Programming Contest

IIIT Hyderabad is back with its Online Programming Contest CodeCraft 2007. This is the 5th year of Codecraft. It has grown over the years and has witnessed huge participation on a global scale. The contest is known for having a high quality problemset. It will be held on February 21st, 2007, 6 PM - ...
by sandy007smarty
Sun Feb 11, 2007 10:46 pm
Forum: C
Topic: Participate in CodeCraft 2007 - Online Programming Contest
Replies: 0
Views: 3761

Participate in CodeCraft 2007 - Online Programming Contest

IIIT Hyderabad is back with its OPC CodeCraft.
It will be held on February 21st, 2007, 6 PM - 12 AM IST.

Contest is open to all. Registration has started. Everyone is invited :) Enjoy!
by sandy007smarty
Sun Feb 11, 2007 10:45 pm
Forum: C++
Topic: Participate in CodeCraft 2007 - Online Programming Contest
Replies: 0
Views: 1451

Participate in CodeCraft 2007 - Online Programming Contest

IIIT Hyderabad is back with its OPC CodeCraft. C,C++ and Java coders are invited.
It will be held on February 21st, 2007, 6 PM - 12 AM IST.

Contest is open to all. Registration has started. Everyone is invited :)
by sandy007smarty
Sun Feb 11, 2007 10:44 pm
Forum: Off topic (General chit-chat)
Topic: Participate in CodeCraft 2007 - Online Programming Contest
Replies: 0
Views: 11738

Participate in CodeCraft 2007 - Online Programming Contest

IIIT Hyderabad is back with its OPC CodeCraft.
It will be held on February 21st, 2007, 6 PM - 12 AM IST.

Contest is open to all. Registration has started. Everyone is invited :)
by sandy007smarty
Sun Feb 11, 2007 10:41 pm
Forum: Other words
Topic: Participate in CodeCraft 2007 - Online Programming Contest
Replies: 0
Views: 1610

Participate in CodeCraft 2007 - Online Programming Contest

IIIT Hyderabad is back with its OPC CodeCraft.
It will be held on February 21st, 2007, 6 PM - 12 AM IST.

Contest is open to all. Registration has started. Everyone is invited :)
by sandy007smarty
Fri May 26, 2006 12:28 pm
Forum: Volume 108 (10800-10899)
Topic: 10820 - Send a Table
Replies: 34
Views: 14129

AC in 0.12 but still not satisfied. I am now not using medv's function but a variant of sieve. I calculate totient function for all n from 1 to 50,000. Then I calculate all answers from 1 to 50,000. Then i just scan and print the apropriate answer from the array. Please suggest a better method. How ...

Go to advanced search