Page 1 of 1
Problem 375
Posted: Sun Mar 11, 2012 8:53 pm
by mdean
Thought this one was going to be so simple. Then I find out that apparently C++ can't handle an array of 2 billion elements...
Re: Problem 375
Posted: Sun Mar 11, 2012 9:25 pm
by hk
Try to find out how it can be done without such a memory hungry array but a more humble one.
Re: Problem 375
Posted: Sun Mar 11, 2012 9:59 pm
by mdean
Think I can see how to use less storage. Only question is what ramifications it will have for the overall calculation. It shouldn't hose me too badly, but that first step's going to be rotten. Probably going to have to sleep on it.
Re: Problem 375
Posted: Thu Mar 15, 2012 8:31 pm
by alvaroeuler
Just so I save myself that feeling of deja-vu, could anyone confirm my suspicion that the answer is too large for 64 bits?
Thanks...
Re: Problem 375
Posted: Thu Mar 15, 2012 8:51 pm
by hk
No, it fits in a 64 bit signed integer.
Re: Problem 375
Posted: Fri May 11, 2012 10:19 am
by alpha.xiang
I can't get the correct answer ,my result is xxx,but it's incorrect!
Edit by hk:
Removed (wrong) result.
Don't post results, wrong or not.
I told you before!
Re: Problem 375
Posted: Wed Sep 27, 2017 8:20 pm
by vamsikal3
<deleted post>
Re: Problem 375
Posted: Wed Sep 27, 2017 8:34 pm
by hk
In general we discourage asking for answers (even for lower limits).