Why am I getting a TLE in this code?

Revision ru1, by fan_balae, 2020-05-23 13:26:50

Link to submission: https://codeforces.net/contest/1324/submission/81004543

The algorithm is similar to what most others used but this is showing a TLE on the 24th test. Can anyone point out my error?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
ru1 Russian fan_balae 2020-05-23 13:26:50 239 First edition (опубликовано)