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

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

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

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

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

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