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

Правка en1, от 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?

Теги fast i/o, c++ output, #time

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский jack07 2020-01-31 06:17:21 765 Initial revision (published)