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 ...
i don't understand this cout << div; switch (rem) { case 0: cout << "00"; break; case 1: cout << "25"; break; case 2: cout << "50"; break; case 3: cout << "75"; break; } why you print div then the other value that is in switch-case. did your output matches wit...
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 .
read this : You should note that 80% of the test cases will have at most 1000 numbers in the sequence. so you can run siv atmost for 100000 and remember that this is a consecutive subsequence of length at least two. so sum them and check in siv if it is in limit .if not then check menually that it i...
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? To Shamim when the roots become negetive then this case...
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. Here is the parts of my code: works no...