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
# | User | Rating |
---|---|---|
1 | tourist | 3856 |
2 | jiangly | 3747 |
3 | orzdevinwang | 3706 |
4 | jqdai0815 | 3682 |
5 | ksun48 | 3591 |
6 | gamegame | 3477 |
7 | Benq | 3468 |
8 | Radewoosh | 3462 |
9 | ecnerwala | 3451 |
10 | heuristica | 3431 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | -is-this-fft- | 162 |
3 | Dominater069 | 160 |
4 | Um_nik | 158 |
5 | atcoder_official | 157 |
6 | Qingyu | 156 |
7 | adamant | 151 |
7 | djm03178 | 151 |
9 | luogu_official | 150 |
10 | awoo | 146 |
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. | Lang. | By | When | Δ | Comment | |
---|---|---|---|---|---|---|
en14 |
![]() |
jqdai0815 | 2025-01-24 00:07:08 | 0 | (published) | |
en13 |
![]() |
jqdai0815 | 2025-01-24 00:06:38 | 468 | (saved to drafts) | |
en12 |
![]() |
jqdai0815 | 2025-01-22 09:38:53 | 135 | ||
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) |
Name |
---|