Блог пользователя BrainNotFound

Автор BrainNotFound, история, 2 года назад, По-английски

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

Accepted code : https://codeforces.com/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?

Полный текст и комментарии »

  • Проголосовать: нравится
  • -23
  • Проголосовать: не нравится

Автор BrainNotFound, история, 3 года назад, По-английски

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?

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится