I was participating in the Educational Round the other day. I was trying 915E. I submitted this code but ended up with an RTE on the very first case. Whereas this code doesn't cause any problem on various online IDEs, I am getting RTE on Codeforces. So I debugged a while and ended up with this code. From what I see, its not inputting just after one iteration.
I am all lost here. Anything on this will be so much of help right now! Thanks in advance.
Follow these instructions .
Step 10 can detect the problem
Carefully read documentation http://en.cppreference.com/w/cpp/container/set/erase.
Anyone else please don't point out the bug directly, let him learn to debug his code himself.