stelkasouridis's blog

By stelkasouridis, history, 23 months 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

»
23 months ago, # |
  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.

  • »
    »
    23 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    That was terrible on my end. Exactly that was the issue. I submitted it and it got AC.

    Apparently the one "joking" here was me.