Search found 127 matches

by Subeen
Wed Oct 01, 2003 7:56 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 180068

replace your '//' style comments with '/* */' style comments. then there will be no compile error in your code.

But then u will get TLE cause ur program never terminates. :(
while(1) :)

and after fixing this u will get TLE again cause...:wink:
by Subeen
Tue Sep 30, 2003 9:06 am
Forum: Volume 100 (10000-10099)
Topic: 10002 - Center of Masses
Replies: 59
Views: 26213

I got WA in this problem. Is there any problem with my algorithm / formula ? plz help me. This is what I did: 1. Find the Convex Hull of the Polygon 2. Get the area of the Polygon 3. Using the formula below find the center (X, Y): X = SUM[(Xi + Xi+1) * (Xi * Yi+1 - Xi+1 * Yi)] / (6 * Area) Y = SUM[(...
by Subeen
Mon Sep 29, 2003 7:31 am
Forum: Volume 5 (500-599)
Topic: 547 - DDF
Replies: 9
Views: 4536

anupam: i found a bug in the code.

replace the line

Code: Select all

printf("Input%d: %d %d\nOutput%d: ",cas,a,b,cas++);
by

Code: Select all

printf("Input%d: %d %d\nOutput%d: ",cas++,a,b,cas);
by Subeen
Mon Sep 29, 2003 6:20 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 180068

long int works fine (I got AC using long int in C++). and no need for array. :)
by Subeen
Thu Sep 25, 2003 5:47 am
Forum: C++
Topic: Redirecting standard IO
Replies: 9
Views: 3102

here is it:
for reading from file:

Code: Select all

freopen("input file name", "rt", stdin);
and for writing in file:

Code: Select all

freopen("output file name", "wt", stdout);
just add these two lines before ur program ( in main method )
by Subeen
Wed Sep 24, 2003 9:33 am
Forum: C++
Topic: Redirecting standard IO
Replies: 9
Views: 3102

you can use the freopen() function to test your programs.
by Subeen
Fri Aug 22, 2003 1:22 pm
Forum: Algorithms
Topic: Number Theory!!!!
Replies: 10
Views: 4228

i have got some math sites. check them out:
by Subeen
Fri Aug 22, 2003 12:58 pm
Forum: Algorithms
Topic: Careers in algorithms?
Replies: 11
Views: 4111

i think the greatest thing i get from solving problems is fun. (and i believe everyone thinks so) when i get a problem accecpted it feels like taking a wicket (cricket! :wink: ) or scoring a goal (football aka soccer :wink: ) no more, no less!
by Subeen
Thu Aug 21, 2003 5:14 pm
Forum: Volume 104 (10400-10499)
Topic: 10452 - Marcus
Replies: 21
Views: 9408

thanks for ur reply. now i got it AC. sometimes i do so silly mistakes :cry:
by Subeen
Fri May 30, 2003 10:51 pm
Forum: Volume 104 (10400-10499)
Topic: 10494 - If We Were a Child Again
Replies: 55
Views: 17072

finally got accepted using long long int type variable.

thanks to all for their help :lol:
by Subeen
Thu May 29, 2003 8:05 am
Forum: Volume 104 (10400-10499)
Topic: 10494 - If We Were a Child Again
Replies: 55
Views: 17072

10494 - If We Were a Child Again

I got WA in this problem. But can't find bugs in my programs. :(
Someone please give me some test input/output to test my program.
thanks...
by Subeen
Thu May 15, 2003 5:29 am
Forum: Volume 104 (10400-10499)
Topic: 10452 - Marcus
Replies: 21
Views: 9408

i m also getting WA. can u help me?
[c]CODE REMOVED[/c]
by Subeen
Mon May 05, 2003 4:48 pm
Forum: Other words
Topic: Appeal to acm.uva.es administrators and problemsetters.
Replies: 12
Views: 1992

I think for standard algorithms there should be a list. So that after learning an algorithm one can try to solve 2/3 problems with that algorithm. But not for all the problems there should be a list. Because it's an important quality for a programmer ( specially contestant ) to find the appropriate ...
by Subeen
Sat May 03, 2003 6:42 am
Forum: Volume 104 (10400-10499)
Topic: 10489 - Boxes of Chocolates
Replies: 28
Views: 8067

I also faced problem understanding the problem during the contest... it made me almost mad!!! ( i think i m too stupid... ) :( :(

Problem statements should be more clear... so that everyone at least understand the problem... :)
by Subeen
Fri Apr 04, 2003 5:01 pm
Forum: Volume 103 (10300-10399)
Topic: 10354 - Avoiding Your Boss
Replies: 47
Views: 21247

i am getting WA. what i tried to do:... 1. using dijkstra find the shortest path cost from home(yh) to market(m) 2. using dijkstra find all shortest paths from boss's home to office and delete the nodes from the graph. 3. now again using dijkstra find the shortest path cost from home(yh) to market(m...

Go to advanced search