Sets in C++ 17 vs C++ 20, 23

Revision en1, by _Sherbiny, 2025-02-17 17:47:39

Hi, I wanted to share something weird that happened to me in the previous round.

After about an hour, I submitted this code for problem D: Submission 306394465

I knew the code had high memory and time complexity, but I was confident it would pass given the constraints. However, I received a Memory Limit Exceeded (MLE) verdict.

After the round, I resubmitted the exact same code using C++ 17, and it passed—with a huge difference in memory usage!

Submission 306462649

I just wanted to share this random incident and ask if anyone knows the reason behind it.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English _Sherbiny 2025-02-17 17:47:39 803 Initial revision (published)