primeprogrammer2021's blog

By primeprogrammer2021, 6 weeks ago,

I got TLE with GNU C++20 (64) : 158299729

And AC with GNU C++17 : 158299827

You can check that both the submissions are exactly same.

Also, I custom tested 158299729 and found out that it is taking 3 seconds.

Can anyone tell the main difference between these two versions?

• -9

 » 6 weeks ago, # |   +1 Honestly, I don't know. I had the same issue the other day. My code got TLE with GNU C++17, and AC with GNU C++20.
•  » » 6 weeks ago, # ^ |   0 Well that's understandable as they fixed some issues in older version.But in my case, the code is AC with older version and TLE with newer version, which I think shouldn't happen.
 » 6 weeks ago, # |   +19 Probably this test case 176 was made in such a way to trigger quadratic behavior in the C++20 implementation of unordered_map. Better just use a map, or learn about proper hashing.
•  » » 6 weeks ago, # ^ |   0 Oh, okay, thanks for the reasoning