So, while trying this problem 1735D - Meta-set, I encountered huge difference in execution times between G++ 17 and G++ 20.
Submission 1 with G++ 20: 266669242 Verdict: TLE ( 4000ms ).
Submission 2 with G++ 17: 266672467 Verdict: AC ( 832ms only ).
What it took to get the original solution to pass with G++ 20 was to take inputs as char directly instead of reading it as int and then casting to char. That reduced ~200ms of execution time.
Submission 3 with G++ 20: 266672260 Verdict: AC ( 3800ms ).
Submission 4 with G++ 17: 266672385 Verdict: AC ( 718ms only ).
In both scenarios, G++ 17 submssions are approximately 4 times faster ? Both sets of submissions have no diff at all in the CF "Compare" result.
What explains this ?
What exactly is it thats so bad with how I have written my code. (So that something like this doesn't happen in contest.)
I though G++ 17 solutions should run slower when using 64bits integer throughout the code.