Why does my code got TLE ?

Revision en1, by Invidia, 2019-07-28 21:17:13

My algorithm isn't far different than the editorial's solution, but I got TLE.

https://codeforces.com/contest/1187/submission/57906449

Is it because I use map ? or because of the erase ? or maybe something else ?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Invidia 2019-07-28 21:17:13 249 Initial revision (published)