Блог пользователя stelkasouridis

Автор stelkasouridis, история, 23 месяца назад, По-английски

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?

  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится

»
23 месяца назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

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 месяца назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    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.