DmitryS's blog

By DmitryS, history, 3 years ago, In English

Hi guys!

Solving the 1574C problem ended with TIME_LIMIT_EXCEEDED. Comparing my code with the Solution I found only 2 significant differencies: ios_base::sync_with_stdio(false); cin.tie(NULL);

Just compare 130080268 with 130164765.

Adding this lines to my code I had Accepted solution. So I am surprised that C++ I/O operations without optimizations is so computationally intensive. Is there any other tips to improve the code? May be standard C I/O should be used?

Full text and comments »

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

By DmitryS, history, 3 years ago, translation, In English

When solving problem 1574C — Slay the Dragon using Clang ++ 17, I encountered Memory Limit. After n hours trying to figure out what was wrong, I got into the solution (https://codeforces.com/blog/entry/95188), copied the code from there and sent it for review (129995765). Got the same Memory Limit Exceeded. I don't see any other C ++ compilers in the list. Can someone tell me what the problem is?

Full text and comments »

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