Nagasai_Gella's blog

By Nagasai_Gella, 3 hours ago, In English

If you are using C++ and getting TLE, try adding these fast I/O lines at the very beginning of your main() function:cppios_base::sync_with_stdio(false); cin.tie(NULL);

Use code with caution.Also, make sure you use '\n' instead of endl. endl forces a flush every time it is called, which adds significant overhead and can easily cause a Time Limit Exceeded verdict when the number of test cases or queries is large.

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

»
3 hours ago, hide # |
Rev. 2  
Vote: I like it 0 Vote: I do not like it

Try out the featured section: add featured --> add links --> put the link to your profile and name it with smth you want others to see (e.g. 'Codeforces -- 1000 problems solved') And that's it