Strange behavior with flushing in interactive problems (at least for GNU C11)

Правка en1, от osalbahr, 2022-06-02 18:29:01

Is there a reason why I needed to fflush( stdout ) in the sample interactive problem even though I printed a newline in the printf? When I run the code locally, it does flush automatically, as expected.

Without fflush: Idleness limit exceeded on test 1

https://mirror.codeforces.com/gym/101021/submission/159265004

With fflush: Accepted

https://mirror.codeforces.com/gym/101021/submission/159265085

Shouldn't they be equal? I am not sure if this is a misunderstanding on my behalf, or an issue in the interactor (at least for GNU C11).

(Comment in context https://mirror.codeforces.com/blog/entry/45307#comment-918362)

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский osalbahr 2022-06-02 18:29:01 692 Initial revision (published)