RE in 479C EXAMS (codeforces)

I have been trying to solve the question -
https://codeforces.com/problemset/problem/479/C
And my solution is-
https://codeforces.com/problemset/submission/479/89098170

It seems that the compare function is responsible for this error as removing it gives an AC.
What possibly could be the reason…?

Please Read

1 Like

Thanks…:smiley: