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

Revision en1, by 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://codeforces.me/gym/101021/submission/159265004

With fflush: Accepted

https://codeforces.me/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://codeforces.me/blog/entry/45307#comment-918362)

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English osalbahr 2022-06-02 18:29:01 692 Initial revision (published)