Please read the new rule regarding the restriction on the use of AI tools. ×

Aritro_Sarkar's blog

By Aritro_Sarkar, history, 2 hours ago, In English

Today, I was trying to solve This Problem and This was my solution which got TLE in test 5. (in C++ 17)

Except it's not supposed to.

I calculated the time complexity and it is way smaller than the time limit.

I tried submitting the same solution in C++ 20 13.2 (64 bits, winlibs) Here, which is Accepted.

They are the same solution but in different languages.

I knew that C++ 17 differs from C++ 20, but I didn't know it did that much.

If this happened to me in a contest, I would probably break something.

So, I will never submit a solution in C++ 17 ever again. (And keep my belongings safe)

Anyways, if anyone knows why it's like that, please let me know.

  • Vote: I like it
  • -15
  • Vote: I do not like it