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

Автор JuanCamilo1979, история, 4 месяца назад, По-английски

I was search some ways to improve the speed in inputs, Do you know some of these ways to improve the speed of inputs? There is other different way of ios_base::sync_with_stdio(0); cin.tie(nullptr); cout.tie(nullptr);

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

»
4 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by JuanCamilo1979 (previous revision, new revision, compare).

»
4 месяца назад, # |
Rev. 2   Проголосовать: нравится +1 Проголосовать: не нравится

It is often recommended to use scanf/printf instead of cin/cout for fast input and output. However, you can still use cin/cout and achieve the same speed as scanf/printf by including the following two lines in your main() function: ios_base::sync_with_stdio(false);

»
4 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится
cin.tie(0)->sync_with_stdio(0);