stelkasouridis's blog

By stelkasouridis, history, 4 years ago, In English

Hi all,

For today's Codeforces Global Round 23, I prepared my solution for Problem E1 — Joking (Easy Version).

The submission is receiving idleness limit exceeded, although I flush the buffer with endl after every line I print. Why does that happen?

  • Vote: I like it
  • +3
  • Vote: I do not like it

»
4 years ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

You don't include the length of the subset S you output, so if you try to output the set {2, 3} you output

? 2 3

which the interactor interprets as a set of length 2 with first element 3 and waits for you to output the second element (causing Idleness Limit Exceeded).

You also seem to be using fast input (which unties cin and cout), but I don't know if that causes issues.