Huge difference in execution time between two languages — Is it really reasonable?

Revision en1, by Mindeveloped, 2025-05-09 05:02:12

Look at 318888244 and 318888731. The former one got TL on test 31. The latter one got AC, running only for less than 1.6s on test 31. The only difference is that one is submitted in C++ 17, and the other one is submitted in C++ 20, which seems weird.

I've noticed that C++17 (GCC 7-32) is 32-bit compiler and C++20 (GCC 13-64) is 64-bit compiler. However, I didn't use 64-bit data types in my program, so this shouldn't be the case. Also different C++ language standards isn't much relevant to execution efficiency either. I believe that there must be something unusual with the Codeforces compiler set.

So can anybody explain the hidden reason behind it?

Tags compilers, tle

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Mindeveloped 2025-05-09 05:11:44 185
en1 English Mindeveloped 2025-05-09 05:02:12 769 Initial revision (published)