C++17 and C++20 question

Revision en1, by elamharnish, 2023-06-21 12:12:03

In a Codeforces Round 880 contest in the problem C (Div. 2) (or A Div. 1) I have got a time limit when I used C++17 (submission: https://codeforces.me/contest/1836/submission/210134408) and have got AC using C++20 (https://codeforces.me/contest/1836/submission/210135600) with exactly the same code. Of course my solution was not optimal (I used binary search), but my question to the community is why C++20 submission is faster? Is it a general fact, and hence it is better to use it further? Thank you for answering.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English elamharnish 2023-06-21 12:12:03 544 Initial revision (published)