BrainNotFound's blog

By BrainNotFound, history, 3 years ago, In English

TLE code : https://codeforces.me/contest/1613/submission/137709567

Accepted code : https://codeforces.me/contest/1613/submission/137711275

The only difference is:

AC : fin(i,0,n){ cout<<v[i]<<"\n"; }

TLE : fin(i,0,n){ cout<<v[i]<<endl; }

I know endl is supposed to be a bit slower because it flushes the output, but how is the difference significant enough to give a TLE?

Full text and comments »

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

By BrainNotFound, history, 3 years ago, In English

TLE submission (GNU C11)

AC submission

The execution time is 202ms on the C++ 17 compiler, while it's greater than 1000ms on GNU C11. I have never encountered this before. What is causing this TLE?

Full text and comments »

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