Why is C++ 14 better than C++ 20 in memory management here?
Difference between en1 and en2, changed 4 character(s)
Hello all, I participated in Codeforces Round #765 (Div. 2). I implemented a 0/1 Trie for {D. Binary Spiders} => {https://codeforces.com/contest/1625/problem/D}↵

When I used C++
1720 {https://codeforces.com/contest/1625/submission/142523361} it got an MLE verdict and the memory required is 262144 KB.↵

However when I changed it to C++14 {https://codeforces.com/contest/1625/submission/142523239} it got an AC verdict and the memory required is 161068 KB.↵

Why does this happen, how can the same code require so much more memory in C++20? Can anyone help me? Kinda seems like black magic to me.↵

Thank you!

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Nozarashi 2022-01-12 18:41:13 4 Tiny change: 'I used C++17 {https://' -> 'I used C++20 {https://'
en1 English Nozarashi 2022-01-12 18:40:38 670 Initial revision (published)