JuanCamilo1979's blog

By JuanCamilo1979, history, 4 months ago, In English

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

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

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

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

»
4 months ago, # |
Rev. 2   Vote: I like it +1 Vote: I do not like it

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 months ago, # |
  Vote: I like it 0 Vote: I do not like it
cin.tie(0)->sync_with_stdio(0);