i think my appoach to the problem is right but i am not able to pass testcase10 .don’t know where the problem is
it will be nice if you can help with the mistake in my code.
i have commented the code ,so that its easy for you to understand my approach.
any help is appriciated
QUESTION:
http://codeforces.com/problemset/problem/186/A
ANSWER: