When submitting a solution in C++, please select either C++14 (GCC 6-32) or C++17 (GCC 7-32) as your compiler. ×

Zhora_.004's blog

By Zhora_.004, history, 2 years ago, In English

Hey CF!

Today I submitted the exact same code in C++ 20 and C++ 17. In C++ 17 it passed but TLE in C++20.

132652146 C++ 20 (TLE).

132652139 C++ 17 (ACCEPTED).

Does it mean that C++ 17 is faster than C++ 20?

  • Vote: I like it
  • +3
  • Vote: I do not like it

»
2 years ago, # |
Rev. 2   Vote: I like it -7 Vote: I do not like it

I think it has more to do with being 64 bits than anything. Submitting with 64bits in c++17 gives 998ms: https://codeforces.com/contest/420/submission/132652146.

Also, c++20 is faster sometimes and slower in other times, its not universally better or worse.