This is just impossible and gradually i’m getting irritated like hell. my solution is
http://www.codechef.com/viewsolution/4605216. I’m passing every possible testcase…
I’m trying not to lose hope but it’s been a real test of character and i’m failing this!