Can any please help me resolve this? I have tried, iostream/stdin, nothing seems to work. https://mirror.codeforces.com/contest/1504/submission/111973501.
| # | User | Rating |
|---|---|---|
| 1 | Benq | 3792 |
| 2 | VivaciousAubergine | 3647 |
| 3 | Kevin114514 | 3603 |
| 4 | jiangly | 3583 |
| 5 | turmax | 3559 |
| 6 | tourist | 3541 |
| 7 | strapple | 3515 |
| 8 | ksun48 | 3461 |
| 9 | dXqwq | 3436 |
| 10 | Otomachi_Una | 3413 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 157 |
| 2 | adamant | 153 |
| 3 | Um_nik | 147 |
| 4 | Proof_by_QED | 146 |
| 5 | Dominater069 | 145 |
| 6 | errorgorn | 141 |
| 7 | cry | 139 |
| 8 | YuukiS | 135 |
| 9 | TheScrasse | 134 |
| 10 | chromate00 | 133 |
Can any please help me resolve this? I have tried, iostream/stdin, nothing seems to work. https://mirror.codeforces.com/contest/1504/submission/111973501.
| Name |
|---|



Try to flush stdout only after output (not after input).
Actually tried it before, but https://mirror.codeforces.com/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://mirror.codeforces.com/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...