WA on gym103049-problem D

Revision en1, by AC_in_the_dark, 2021-05-06 11:23:08

D. Dragon Balls It's an interactive problem. This code can pass, but this one got "Wrong answer on test 14". You can also see these two codes here. I tried test 14 locally. It seems that it can give the right answer. Does anyone know what's wrong with it? By the way, I don't know if I should use something like cout.flush() for interactive problems. It seems that some submissions passed without any cout.flush() or endl. (They simply use "\n" to type a new line.) So should I pay attention to flush my output in such cases?


  Rev. Lang. By When Δ Comment
en3 English AC_in_the_dark 2021-05-07 03:29:05 1852 Change: the codes are pasted right here.
en2 English AC_in_the_dark 2021-05-06 11:24:36 0 (published)
en1 English AC_in_the_dark 2021-05-06 11:23:08 760 Initial revision (saved to drafts)