Please read the new rule regarding the restriction on the use of AI tools. ×

et__fpme__'s blog

By et__fpme__, history, 3 years ago, In English

Can any please help me resolve this? I have tried, iostream/stdin, nothing seems to work. https://codeforces.me/contest/1504/submission/111973501.

  • Vote: I like it
  • -11
  • Vote: I do not like it

| Write comment?
»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Try to flush stdout only after output (not after input).

»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I had the same error message, the reason was that I was outputting 2 lines instead of only 1 in some cases

3
1
2 1 3
3
1 1 2
1
3 1 1
3
1 2 3
2 2 1      <----- BAD