Thank you for participating in this round! Problems I are authored by orzdevinwang and the rest by me.
Sorry for the weak pretest in problem B.
Hint 1
Solution
№ | Пользователь | Рейтинг |
---|---|---|
1 | jiangly | 4039 |
2 | tourist | 3841 |
3 | jqdai0815 | 3682 |
4 | ksun48 | 3590 |
5 | ecnerwala | 3542 |
6 | Benq | 3535 |
7 | orzdevinwang | 3526 |
8 | gamegame | 3477 |
9 | heuristica | 3357 |
10 | Radewoosh | 3355 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 168 |
2 | -is-this-fft- | 165 |
3 | atcoder_official | 160 |
3 | Um_nik | 160 |
5 | djm03178 | 157 |
6 | Dominater069 | 156 |
7 | adamant | 153 |
8 | luogu_official | 152 |
9 | awoo | 151 |
10 | TheScrasse | 147 |
IAEPC Preliminary Contest (Codeforces Round 999, Div. 1 + Div. 2) Editorial
Thank you for participating in this round! Problems I are authored by orzdevinwang and the rest by me.
Sorry for the weak pretest in problem B.
What is the parity of $$$s$$$ after an operation?
After the first operation, $$$s$$$ is always odd. You can only earn points when $$$a_i$$$ is odd after this operation. However, during the first operation, you can only earn a point if $$$a_i$$$ is even.
Let $$$c_0$$$ and $$$c_1$$$ be the number of even and odd numbers, respectively.
If there is at least one even number, you can place it first, making the answer $$$c_1 + 1$$$. Otherwise, since no points can be earned during the first operation, the answer is $$$c_1 - 1$$$.
Time complexity: $$$O(n)$$$.
Rev. | Язык | Кто | Когда | Δ | Комментарий | |
---|---|---|---|---|---|---|
en11 | jqdai0815 | 2025-01-20 22:33:31 | 62 | (published) | ||
en10 | jqdai0815 | 2025-01-20 22:25:31 | 494 | (saved to drafts) | ||
en9 | jqdai0815 | 2025-01-20 21:57:06 | 0 | (published) | ||
en8 | jqdai0815 | 2025-01-20 21:56:29 | 2010 | |||
en7 | jqdai0815 | 2025-01-20 21:29:32 | 12083 | Tiny change: 'oiler>\n\n</spoiler>\n\n' -> 'oiler>\n\n' (saved to drafts) | ||
en6 | jqdai0815 | 2025-01-20 21:22:57 | 1 | (published) | ||
en5 | jqdai0815 | 2025-01-20 21:22:23 | 6421 | |||
en4 | jqdai0815 | 2025-01-20 21:17:54 | 2792 | |||
en3 | jqdai0815 | 2025-01-20 21:15:10 | 1894 | |||
en2 | jqdai0815 | 2025-01-20 21:11:30 | 800 | |||
en1 | jqdai0815 | 2025-01-20 21:06:39 | 79 | Initial revision (saved to drafts) |
Название |
---|