|
|
вернуться в форумTake care of your Binary Search !!!!!!! for(int m=i+2;m<=j;m++) if((m-i)%2==1) { t2+=t1; if(t2<-8000000000LL||(t2>8000000000LL))//Look at this line. break; } else { t1+=t2; if(t1<-8000000000LL||(t1>8000000000LL))//Look at this line. break; } ---- Sorry for my bad English Re: Take care of your Binary Search !!!!!!! You can also do equation system (IDK if it's the correct name). You can make two equations, with two incognitas. It can be solved because you have the same amount of equations and incognitas. Be careful, it's easier with java big integer rather than C++ long long or long double. |
|
|