Is Fast I/O in C++ really fast?

Revision en1, by jack07, 2020-01-31 06:17:21

Hello, I have faced a output time issue with the use of Fast I/O That is basically we add this to run our code fast but in the following problem it isn't going as so. https://mirror.codeforces.com/problemset/problem/832/A (Sasha and Sticks) If I do the following in my code, the output time is written on the right.

1) #define SPEED ios_base :: sync_with_stdio(false), cin.tie(NULL), cout.tie(0) ------- 46ms

2) #define SPEED ios_base :: sync_with_stdio(0), cin.tie(NULL), cout.tie(0) ------- 31ms

3) #define SPEED ios_base :: sync_with_stdio(0), cin.tie(0), cout.tie(0) ------- 31ms

4) And without using SPEED it's ------- 30ms.

So could you please help me out to identify the difference between all 4 written above?

Tags fast i/o, c++ output, #time

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English jack07 2020-01-31 06:17:21 765 Initial revision (published)