Strange differences in execution time of C++17 and C++20 on Codeforces

Revision en1, by 0x4f, 2024-10-04 09:19:54

Today I managed to solve 2020E - Матожидание квадрата and got passed barely within the time limit using C++17. Here is the submission 284264092, and as you see that it runs for 3900+ ms, while the TL is 4000 ms.

However when I selected C++20 and submitted, I found that the execution time was < 1000 ms. 284263872

So can anyone tell me what causes the difference?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English 0x4f 2024-10-04 09:19:54 452 Initial revision (published)