jack07's blog

By jack07, history, 5 years ago, In English

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?

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

| Write comment?
»
5 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

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

»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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