Can some explain why answer
0 0 0 0 1
for Test Case 2 [5 2 2], in the example test case, is not being accepted as an answer.
Problem:
https://codeforces.me/contest/2084/problem/D
You can also check my submission for reference:
Can some explain why answer
0 0 0 0 1
for Test Case 2 [5 2 2], in the example test case, is not being accepted as an answer.
Problem:
https://codeforces.me/contest/2084/problem/D
You can also check my submission for reference:
| # | User | Rating |
|---|---|---|
| 1 | Benq | 3857 |
| 2 | jiangly | 3810 |
| 3 | maroonrk | 3534 |
| 4 | tourist | 3528 |
| 5 | Kevin114514 | 3510 |
| 6 | turmax | 3411 |
| 7 | Um_nik | 3387 |
| 8 | Radewoosh | 3367 |
| 9 | heuristica | 3322 |
| 10 | strapple | 3317 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 157 |
| 2 | maspy | 150 |
| 3 | Um_nik | 145 |
| 4 | Errichto | 139 |
| 5 | adamant | 136 |
| 6 | maroonrk | 134 |
| 7 | DNR | 133 |
| 7 | nik_exists | 133 |
| 9 | AmShZ | 130 |
| 10 | Dominater069 | 129 |
| Name |
|---|



You can erase the first two numbers. Now you have [0, 0, 1]. Erase the first two numbers again and you obtain [1], whose mex is 0. But the maximum is 1 (for example in the array [0, 1, 0, 1, 0], where you will always end with a [0], whose mex is 1).