An unfortunate incident happened with me during Codeforces Div 3 Round 1016.
I submitted my solution during the contest using GCC 23 (the newer C++ compiler version provided), and it got Accepted on pretests. However, during system testing, my solution failed on the 59th test case due to TLE (Time Limit Exceeded).
Out of curiosity and frustration, I switched the compiler to GCC 17 (the older version used in Codeforces official environment) and submitted the exact same code — and guess what? It passed all test cases successfully and got Accepted.
This clearly shows that the compiler version difference led to performance inconsistency — which in my opinion is very unfair. If using the latest compiler penalizes participants instead of providing advantages, it raises serious concerns about contest fairness.
I hope Codeforces team looks into this and either standardizes the compiler across all phases (pretests & system tests) or provides a clear warning about such possible discrepancies.
Links of submissions- gcc 17-https://mirror.codeforces.com/contest/2093/submission/314625845 gcc 23-https://mirror.codeforces.com/contest/2093/submission/314836586
Special thanks to djm03178 for providing valuable insights regarding the behavior of unordered_set across different compiler versions. For anyone facing a similar issue or wanting to understand this better, I highly recommend reading this blog: https://mirror.codeforces.com/blog/entry/132929








I saw it, your code is terrible, no wonder it's $$$\Huge\color{red}{TLE}$$$.
Appreciate your feedback. But fortunately, verdicts in contests are based on whether the code passes within constraints of the given environment if its TLE than it should be TLE on both versions.
My concern here isn't whether my code was perfect — it's about the fact that the same code passed in GCC 17 but failed in GCC 23, which exposes an inconsistency in the judging environment rather than in logic or optimization skills.
Hacked. You shouldn't blame the judge system for providing various compilers that normally work by their own.
The problem is that you didn't understand the way
unordered_sets work for different versions of GCC. It's just that nobody made the test that hacks such code in G++17. There is no fault on the server's side.Please refer to https://mirror.codeforces.com/blog/entry/132929 for more details.
Thanks for the information, I will edit the blog link provided by you above so that others can also benefit from it.