I was working on this problem: https://codeforces.net/problemset/problem/547/B
My first submission is: https://codeforces.net/problemset/submission/547/303635124
This code resulted runtime error on test 49
However, when I removed the equal sign in my comparator function:
bool cmp(int x, int y){ return a[x] <= a[y]; }
My new submision is: https://codeforces.net/problemset/submission/547/303635252
The code was accepted! Can anyone explain why this change made a difference? Thanks!