I got wrong answer with this solution:
http://mirror.codeforces.com/contest/568/submission/12456152
And i got accepted with this solution:
http://mirror.codeforces.com/contest/568/submission/12456422
I think both of them should get accepted. Can someone help me?