Search found 3 matches

by amitwadhwa
Mon Nov 10, 2008 1:27 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 319971

Re: 100 Time Limit Exceeded

I have noticed that the system seems to give very large times for java solutions!

For Problem 100
Java naive algorithm was not accepted and Java solution with modified algo using DP algo gave 1.190 sec.
With C++, Naive algo: 1.170, and the DP algorithm: 0.300 secs

I used the Java input function ...
by amitwadhwa
Mon Nov 10, 2008 12:25 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 319971

Re: 100

Sorry my mistake... had to do I<=j :-/
by amitwadhwa
Sun Nov 09, 2008 9:23 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 319971

Re: 100

I am not able to find the problem in the following code. The test cases are running fine and the output is consistent with the simple algorithm solution.
Can somebody point me to the problem in the following code. I am getting a Wrong Answer (WA). TIA.


import java.io.IOException;
import java.util ...

Go to advanced search