### Qualified's blog

By Qualified, history, 8 days ago, ,

I see people using "ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);" I personally use "ios::sync_with_stdio(0); cin.tie(0);" without the "cout.tie(0);". What is the difference? Is the first option faster than the second?

• +12

 » 8 days ago, # |   +10 cout is not tied to anything by default. So, cout.tie(false) is useless.
•  » » 8 days ago, # ^ |   0 Then why do people still use it?
•  » » » 8 days ago, # ^ | ← Rev. 2 →   +23 Because they saw it from another person who also doesn't know that it's useless, and they keep using it without noticing because it does nothing — not even any trouble.
•  » » » » 8 days ago, # ^ |   0
•  » » » » 7 days ago, # ^ |   0 Oh, I get it, they are just using it because other mindless blokes are using it too.
 » 7 days ago, # | ← Rev. 2 →   0 I personally have the same question in the mind but I have observed somethings, what it does actually is instead of output all the data multiple times, it prints in a one go. That reduces the time taken for execution. For example: you have 10 test case and you print some answer, so If you use Fast I/O : then your output will be printed in One go after processing of all the test cases, If you not use : then your output will be printed one test case a time.that's why it reduces some time of execution.