|Re: Re: Why do I get Segmentation Fault?
||Thanks, that solved it. The code worked fine on my computer, but I guess I'll keep that in mind for future solutions.
Feb 18, 2011 - 10:41:56 pm UTC
|Re: Why do I get Segmentation Fault?
||Perhaps this works differently on your compiler... But on my computer, and on the Judge, if you have cin >> a >> b; When your program inputs b, it doesn't yet have the value of a. Always safer to do c...
Feb 18, 2011 - 8:32:28 pm UTC
|Why do I get Segmentation Fault?
||All of the test input (found at official cemc site) work on my computer, even test case 5. I found that I had to copy the test data (except for the first one) into word or the formatting would be all ...
Feb 18, 2011 - 7:14:50 pm UTC
||Although it is not absolutely necessary; SourSpinach's code avoids it. I do believe the maximum possible answer is 223092870, which fits in an int/longint.
Apr 19, 2009 - 2:49:15 pm UTC
||You may need to use a long long (C++) or an int64 (PAS) to compute your answer.
Apr 19, 2009 - 2:35:53 pm UTC
||A naive approach (that is, just simulating each round) will not work in time.
Apr 18, 2009 - 6:12:56 pm UTC