can any one suggest whats wrong in this???

Q) http://www.codechef.com/MAY14/problems/CHEFBM
my solution :-

http://www.codechef.com/viewsolution/3896589

@tushar_63
it is quite difficult to look someone’s code for the possible error .
But i request you to have a look on the editorial for the given problem and check whether you have taken care of all the things mentioned in the editorial and even this does not work then look on someone’s other code.
may it help you.

if still have doubts feel free to ask

if you like this answer ,feel free to cast votes.:smiley:

giving right ans in all test cases as much as i can think