I read Blowing up unordered_map, and how to stop getting hacked on it but it doesn't work for GNU C++20 (64). Custom invocation of the hack shown in the blog shows:
x = 107897: 0.064 seconds, sum = 2666686666700000
x = 126271: 0.055 seconds, sum = 2666686666700000
which means that this hack doesn't work.
Here are the changes I made to the code in the blog to getting which prime got slowest.
In
GNU G++20 11.2.0 (64bit winlibs)
It giveWow I just tried 20753 and got 1.388 ms.
Well 172933 and 85229 are fine. It gets TLE.