Why does it TLE?

Правка en1, от Dark_knight174, 2024-10-29 17:09:50

I submitted the same solution on two c++ compilers g++ 17 and g++ 20 . On g++ 20 my solution ran quite fast and got ac in 200ms . on the other hand on g++ 17 it got TLE with 2000ms runtime . I dont know whether the issue is with the time complexity of my solution or the compiler?

here is the link for the problem : https://mirror.codeforces.com/contest/1654/problem/C

here are my submissions: (AC) https://mirror.codeforces.com/contest/1654/submission/288743518

(TLE) https://mirror.codeforces.com/contest/1654/submission/288743107

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Dark_knight174 2024-10-29 17:09:50 537 Initial revision (published)