Had a hard time finding the bug in my solution. I thought my algo should work well!
I would really appreciate if someone could point out the test case which would break my code!
http://www.codechef.com/viewsolution/1456568
problem: http://www.codechef.com/OCT12/problems/LUCKY10
thanks
sk