Search found 5 matches
- Sun Sep 05, 2010 8:38 am
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 320785
Re: 100 The 3n + 1 problem Time limit exceeded
Yes, you're right, sorry
- Sat Sep 04, 2010 4:55 am
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 320785
Memoization
Your code is calculating same values more than once.
Suppose you have input like this
100 200
150 300
In first test your code will calculate all cycle lengths for values from 100 to 200.
In second test it will recalculate again the cycle lengths for values from 150 to 200.
You can avoid this ...
Suppose you have input like this
100 200
150 300
In first test your code will calculate all cycle lengths for values from 100 to 200.
In second test it will recalculate again the cycle lengths for values from 150 to 200.
You can avoid this ...
- Tue Aug 17, 2010 2:54 am
- Forum: Volume 1 (100-199)
- Topic: 101 - The Blocks Problem
- Replies: 635
- Views: 110902
Re: 101 - Help me understand why i always got Runtime Error
I finally got AC and the code runs in 0.012 s.
My problem was i misunderstood the statement (my english is not as good as i thought) :
after returning any blocks that are stacked on top of blocks a and b to their initial positions.
This is why i miscoded my functions especially the function "pile ...
My problem was i misunderstood the statement (my english is not as good as i thought) :
after returning any blocks that are stacked on top of blocks a and b to their initial positions.
This is why i miscoded my functions especially the function "pile ...
- Sun Aug 15, 2010 5:18 pm
- Forum: Volume 1 (100-199)
- Topic: 101 - The Blocks Problem
- Replies: 635
- Views: 110902
Re: 101 - Help me understand why i always got Runtime Error
Thanks for your reply,
your suggestion gives Runtime Error too even with
your suggestion gives Runtime Error too even with
Code: Select all
char cmd[10], param[10];
- Sun Aug 15, 2010 4:17 am
- Forum: Volume 1 (100-199)
- Topic: 101 - The Blocks Problem
- Replies: 635
- Views: 110902
[SOLVED]101- Runtime Error
Hello,
I got Runtime Error on the problem 101. I read some posts related to the topics on this board and try to make the changes that they suggest and run the inputs i found there, it works fine on my computer but when uploaded on UVa, i got Runtime Error (8 times).
This is the email i receive
Hi ...
I got Runtime Error on the problem 101. I read some posts related to the topics on this board and try to make the changes that they suggest and run the inputs i found there, it works fine on my computer but when uploaded on UVa, i got Runtime Error (8 times).
This is the email i receive
Hi ...