Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

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

Автор ahmadnedall, история, 4 часа назад, По-английски

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) .

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

»
65 минут назад, # |
  Проголосовать: нравится -7 Проголосовать: не нравится

why do you get -8?

I think that's useful.

»
59 минут назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

everyone from lil Timmy to big Billy knows that