my accepted code gives wrong answer.


7 3

1 1 2 2 2 5 5

for the above test case, my accepted code gives “no”.
Also, if the array in the above case is input sorted, my code gives “no” otherwise “yes”.


then write it to codechef

Hey @u1m_6

If this is from problem SANSKAR, then this is the hot topic for discussion on discussion forum for weaker test cases check this thread: ,

and might be you are lucky that your code is accepted even after it has a bug…
Believe me or not After 58 submissions I was able to get a score of 100. :stuck_out_tongue:

just mail your problem to

58 submissions!! i know that feel bro…