Can any please help me resolve this? I have tried, iostream/stdin, nothing seems to work. https://codeforces.me/contest/1504/submission/111973501.
| # | User | Rating |
|---|---|---|
| 1 | Benq | 3676 |
| 2 | Kevin114514 | 3659 |
| 3 | jiangly | 3640 |
| 4 | turmax | 3450 |
| 5 | tourist | 3408 |
| 6 | strapple | 3360 |
| 7 | Um_nik | 3354 |
| 8 | squareOf105 | 3348 |
| 9 | maroonrk | 3312 |
| 10 | idontwannadothis…e | 3191 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 154 |
| 2 | nik_exists | 151 |
| 3 | maspy | 149 |
| 4 | AmShZ | 146 |
| 5 | Um_nik | 143 |
| 6 | Errichto | 139 |
| 7 | BledDest | 136 |
| 8 | adamant | 135 |
| 9 | maroonrk | 133 |
| 10 | cry | 130 |
Can any please help me resolve this? I have tried, iostream/stdin, nothing seems to work. https://codeforces.me/contest/1504/submission/111973501.
| Name |
|---|



Try to flush stdout only after output (not after input).
Actually tried it before, but https://codeforces.me/contest/1504/submission/112014874 doesn't work either.
Your solution not work on input:
2
1 1 2 2
Interactor in that problem is adaptive.
I had the same error message, the reason was that I was outputting 2 lines instead of only 1 in some cases
For the WA test case (first test case) at least, my code gives correct answer, without duplicate lines. https://codeforces.me/contest/1504/submission/112014874
It says it found the end of the file instead of an int, maybe the program isn't outputting everything that it should be...