narendra_chiku's blog

By narendra_chiku, history, 3 years ago, In English

Hello Codeforces!

During Educational Codeforces Round 130 (rated for Div 2) contest, I submitted my solution for Problem C 1697C - Любимая задача awoo in GNU G++17 7.3.0 and I got TLE on testcase 10 as verdict and after contest when I submitted the same solution in GNU G++17 9.2.0(64 bit, winlibs), what I saw, the code got ACCEPTED. This whole thing burnt my mind and that's why I am writing this blog.

Here's a proof for the same I mentioned.
For solution 160374839, got TLE as verdict.
For this solution 160450643, got ACCEPTED.

MikeMirzayanov please looks into it and explain it properly and also if possible accept my solution.

Guys please upvote if u are agree with this.

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
3 years ago, # |
  Vote: I like it +2 Vote: I do not like it

Codeforces must keep a better compiler (GNU G++17 9.2.0) only, so that no one faces similar issues in upcoming contests.

»
3 years ago, # |
Rev. 2   Vote: I like it +11 Vote: I do not like it

GNU G++17 7.3.0 is 32 bit and 64 bit long long datatype is slow in it comparable to int .
I just change the the following line: #define ll long long int into #define ll int, and your code get accepted in c++17.

when you use 64 bit in c++ it's preferable to use c++ 64 bit and also for python programmers pypy64 is very powerful than pypy3 32 bit.