Getting TLE when it shouldn't

Revision en2, by latfire, 2018-06-23 10:54:42

Hello. I recently solved the problem C of Round #490, Div3 (Alphabetic Removals). I am getting a TLE on the solution and I can't seem to find the error. My solution takes O(4*10^5) time, which should work fine. Please help. Below is my code. 39534219 999C - Alphabetic Removals

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English latfire 2018-06-23 10:54:42 16 Tiny change: '9534219]\n\n' -> '9534219]\n[problem:999C]\n'
en1 English latfire 2018-06-23 10:53:55 298 Initial revision (published)