I can't understand what is wrong with this piece of code of mine as a solution of the problem 158A: https://codeforces.me/contest/158/submission/67632208 Then I submitted this solution and it worked: https://codeforces.me/contest/158/submission/67947459 Please help me understand why the code that I submitted earlier fails.
It is impossible to read the code in your post. Please provide links to submissons.
Done
Auto comment: topic has been updated by Akuver (previous revision, new revision, compare).
Here I accepted your own code :D