Why apprently same code give different resultat : Accepted and TLE?

Правка en3, от rumike, 2024-05-16 18:13:10

For the problem 1822G1 - Magic Triples (Easy Version), I submitted this code 261212704 that return TLE. The complexity of this is O(n * sqrt( Max)) which leads to 10^8 operations, so that code must passed when using c++ with basic operations.

After looked at the editorial, it's the same logic with same complexity, and after submitted the editorial code 261212704, I got accepted. Can someone find what's wrong? Thanks in advance

Теги tle, number theory

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский rumike 2024-05-16 18:13:10 4 Tiny change: 'sion:261215245] that ret' -> 'sion:261212704] that ret'
en2 Английский rumike 2024-05-16 18:05:46 3 Tiny change: 'erations. \nAfter lo' -> 'erations. ****\nAfter lo'
en1 Английский rumike 2024-05-16 18:04:46 506 Initial revision (published)