i know it is simply a LDS problem and my prog gives same output as mf. but i got wrong answer in 0.107 sec and cannot find bugs.my algorithm is i use LDS from the reverse of the array then find the increasing seqence from the front side for each query. can anyone check if my given output is correct ...
this is a huge code .
it is better to post your procedure than code for better undestanding
for the reader.
and you also may get the reply from all the programmers of different
languages .
Thanks again Cho. same output again without any modify. its may be floating point error. Ok, i'll try to solve without floating point oparetion. but i can't understand without floating point calculation how do i know that red balls are invalid?
Again same output.why wrong answer ? My procedure is :
1. First I solve the equation to find the roots. 2.if the roots are fractional then R false. 3.Otherwise . if they are not less than .7 or negetive B false. 4.if not,print the root / roots by checking them.