In the submission http://codeforces.me/contest/577/submission/12949782 I first printf "YES" and then I printf some numbers. In the output, the numbers came out first and then the "YES". Documentation for std::ios_base::sync_with_stdio generally seems to indicate that bad effects from disabling it should only occur if you use both C- and C++-style I/O. Here I only used C-style output throughout, yet the print statements were mixed. Is this really an allowed behavior for the library?
It's still possible for your solution to mix
printf
andcout
e.g. whenhub != 0
. Youprintf("YES")
and thencout << i << ...
.Oh... missed that one. Thanks.