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

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

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://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?

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

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

Yes, this is a valid question. Even I faced this problem too. Do anyone have an explanation for this?

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

Did you expected a significant change from two number input and one word output problem?