|
|
back to boardSome hints 1. Use __int64 2. Here is some fragment of my code(and the most significant): for(x=0;x<r;x++) k+=ceil(sqrt((double)(r-x)*(r+x))); <----- be careful!! hint Posted by KALO 9 Oct 2009 00:26 use binary search and the following relation: x^2+y^2=R^2 Re: hint Posted by ASK 4 Mar 2010 16:31 Re: Some hints Posted by LyanA 1 May 2013 14:27 this staff is nice. that let me deal problem. looks like sqrt can't handle 100000*100000 also (r-x)(r+x) == r*r - x*x, but first can be handled with sqrt but second not finally, thanks at all sorry for bad english |
|
|