Please read the new rule regarding the restriction on the use of AI tools. ×

ahmadnedall's blog

By ahmadnedall, history, 24 minutes ago, In English

If you write solutions on C++ it regularly happens than input reading through std::cin appears to be slow because of the large input size. Certainly is more correct in such cases to write data reading more effectively — at least using scanf. But if the testing system uses GNU C++ checked on MinGW 4.4.1, but I think it works on other versions too), and you don't want to rewrite input reading, it is possible to improve performance by only one line placed in the beginning of the program: ios_base::sync_with_stdio(0) .

Full text and comments »

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