1779A - Hall of Fame
Author: n0sk1ll
Hint
Solution
Bonus
1779B - MKnez's ConstructiveForces Task
Hint
Solution
Bonus
# | User | Rating |
---|---|---|
1 | tourist | 3993 |
2 | jiangly | 3743 |
3 | orzdevinwang | 3707 |
4 | Radewoosh | 3627 |
5 | jqdai0815 | 3620 |
6 | Benq | 3564 |
7 | Kevin114514 | 3443 |
8 | ksun48 | 3434 |
9 | Rewinding | 3397 |
10 | Um_nik | 3396 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 156 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | nor | 152 |
Temporary Editorial
Author: n0sk1ll
In one move, Milica can replace the whole string with $$$\texttt{AA} \ldots \texttt{A}$$$. In her second move, she can replace a prefix of length $$$k$$$ with $$$\texttt{BB} \ldots \texttt{B}$$$. The process takes no more than $$$2$$$ operations. The question remains — when can we do better?
In the hint section, we showed that the minimum number of operations is $$$0$$$, $$$1$$$, or $$$2$$$. We have $$$3$$$ cases:
No operations are needed if $$$s$$$ already contains $$$k$$$ characters $$$\texttt{B}$$$.
Else, we can use brute force to check if changing some prefix leads to $$$s$$$ having $$$k$$$ $$$\texttt{B}$$$s. If we find such a prefix, we print it as the answer, and use only one operation. There are $$$O(n)$$$ possibilities. implementing them takes $$$O(n)$$$ or $$$O(n^2)$$$ time.
Else, we use the two operations described in the hint section.
A fun fact is that only one operation is enough. Can you prove it?
...
...
...
Rev. | Lang. | By | When | Δ | Comment | |
---|---|---|---|---|---|---|
en80 | n0sk1ll | 2023-11-19 19:35:24 | 0 | (published) | ||
en79 | n0sk1ll | 2023-11-19 19:25:25 | 2 | Tiny change: '## [1898B *-* Milic' -> '## [1898A *-* Milic' | ||
en78 | n0sk1ll | 2023-11-19 19:25:02 | 71 | |||
en77 | n0sk1ll | 2023-11-19 19:24:46 | 67 | |||
en76 | n0sk1ll | 2023-11-19 19:24:15 | 9 | Tiny change: '## [1898B ‐ Milica and' -> '## [1898B-Milica and' | ||
en75 | n0sk1ll | 2023-11-19 19:23:54 | 1 | Tiny change: '# [1898B — Mili' -> '# [1898B ‐ Mili' | ||
en74 | n0sk1ll | 2023-11-19 19:22:13 | 76 | |||
en73 | n0sk1ll | 2023-11-19 19:19:56 | 1 | Tiny change: 'oblem:1898A]\n\nAuth' -> 'oblem:1898 A]\n\nAuth' | ||
en72 | n0sk1ll | 2023-11-19 19:19:39 | 2 | Tiny change: 'roblem:1897A]\n\nAuth' -> 'roblem:1898A]\n\nAuth' | ||
en71 | n0sk1ll | 2023-11-19 19:15:37 | 2 | Tiny change: 'roblem:1898A]\n\nAuth' -> 'roblem:1897A]\n\nAuth' | ||
en70 | n0sk1ll | 2023-11-19 19:15:22 | 4 | Tiny change: '[problem:12A]\n\nAuth' -> '[problem:1898A]\n\nAuth' | ||
en69 | n0sk1ll | 2023-11-19 19:07:55 | 4 | Tiny change: '[problem:1898A]\n\nAuth' -> '[problem:12A]\n\nAuth' | ||
en68 | n0sk1ll | 2023-11-19 19:06:58 | 4 | Tiny change: '[problem:12A]\n\nAuth' -> '[problem:1898A]\n\nAuth' | ||
en67 | n0sk1ll | 2023-11-19 19:06:40 | 4 | Tiny change: '[problem:1898A]\n\nAuth' -> '[problem:12A]\n\nAuth' | ||
en66 | n0sk1ll | 2023-11-19 19:06:25 | 0 | Tiny change: '## [problem:1898A]\n\nAuthor' -> '## \n\nAuthor' | ||
en65 | n0sk1ll | 2023-11-19 16:41:26 | 0 | Tiny change: '## [problem:1' -> '[problem:1' | ||
en64 | n0sk1ll | 2023-11-19 16:39:45 | 24 | |||
en63 | n0sk1ll | 2023-11-19 11:58:57 | 56 | |||
en62 | n0sk1ll | 2023-11-18 22:23:08 | 6 | Tiny change: '<j_1$.\n\nOverall com' -> '<j_1$.\n\nThe overall com' | ||
en61 | n0sk1ll | 2023-11-18 22:22:32 | 2 | Tiny change: 'bet size (\alpha=26 in this p' -> 'bet size ($\alpha=26$ in this p' | ||
en60 | n0sk1ll | 2023-11-18 22:22:00 | 111 | |||
en59 | n0sk1ll | 2023-11-18 22:11:55 | 12 | Tiny change: 'ater than the secon' -> 'ater than or equal to the secon' | ||
en58 | n0sk1ll | 2023-11-18 22:11:19 | 4 | |||
en57 | n0sk1ll | 2023-11-18 22:10:39 | 36 | |||
en56 | n0sk1ll | 2023-11-18 22:09:53 | 1387 | |||
en55 | BULLMCHOW | 2023-11-18 20:12:16 | 57 | |||
en54 | BULLMCHOW | 2023-11-18 20:10:22 | 244 | |||
en53 | BULLMCHOW | 2023-11-18 20:05:00 | 17 | |||
en52 | BULLMCHOW | 2023-11-18 19:57:53 | 3 | |||
en51 | BULLMCHOW | 2023-11-18 19:56:55 | 4 | Tiny change: ' $s_j$ to the position ' -> ' $s_j$ to position ' | ||
en50 | BULLMCHOW | 2023-11-18 19:54:02 | 9 | |||
en49 | BULLMCHOW | 2023-11-18 19:52:28 | 2 | |||
en48 | BULLMCHOW | 2023-11-18 19:52:28 | 0 | |||
en47 | BULLMCHOW | 2023-11-18 19:52:28 | 2217 | |||
en46 | BULLMCHOW | 2023-11-18 18:36:42 | 129 | |||
en45 | BULLMCHOW | 2023-11-18 18:35:05 | 1924 | |||
en44 | BULLMCHOW | 2023-11-18 18:34:10 | 1934 | Reverted to en39 | ||
en43 | BULLMCHOW | 2023-11-18 18:34:01 | 1600 | Reverted to en41 | ||
en42 | BULLMCHOW | 2023-11-18 18:33:19 | 2064 | |||
en41 | BULLMCHOW | 2023-11-18 18:32:23 | 181 | |||
en40 | BULLMCHOW | 2023-11-18 18:31:35 | 1997 | |||
en39 | n0sk1ll | 2023-11-18 12:10:56 | 2 | Tiny change: 'bilities. implementin' -> 'bilities. Implementin' | ||
en38 | n0sk1ll | 2023-11-18 12:07:00 | 7 | Tiny change: 'd $j$, we simply find the ' -> 'd $j$, we find the ' | ||
en37 | n0sk1ll | 2023-11-18 12:02:57 | 230 | |||
en36 | n0sk1ll | 2023-11-15 23:17:37 | 45 | |||
en35 | n0sk1ll | 2023-11-15 23:13:25 | 89 | |||
en34 | n0sk1ll | 2023-11-15 23:11:36 | 54 | |||
en33 | n0sk1ll | 2023-11-15 23:09:36 | 16 | Tiny change: ' times as it should (and try ' -> ' times as necessary (and try ' | ||
en32 | n0sk1ll | 2023-11-15 23:08:30 | 1332 | |||
en31 | n0sk1ll | 2023-11-15 15:15:36 | 56 | |||
en30 | n0sk1ll | 2023-11-15 15:12:25 | 2056 | |||
en29 | n0sk1ll | 2023-11-13 21:55:30 | 2 | Tiny change: 'ed in the *hint* section.\' -> 'ed in the hint section.\' | ||
en28 | n0sk1ll | 2023-11-13 21:53:55 | 155 | |||
en27 | n0sk1ll | 2023-11-13 21:48:01 | 1519 | |||
en26 | n0sk1ll | 2023-11-12 21:14:31 | 235 | |||
en25 | n0sk1ll | 2023-11-12 21:11:13 | 57 | |||
en24 | n0sk1ll | 2023-11-12 21:09:33 | 147 | |||
en23 | n0sk1ll | 2023-11-12 21:04:05 | 643 | |||
en22 | n0sk1ll | 2023-11-12 20:41:57 | 2562 | |||
en21 | n0sk1ll | 2023-10-07 22:46:21 | 107 | |||
en20 | n0sk1ll | 2023-10-07 22:44:30 | 38 | |||
en19 | n0sk1ll | 2023-10-07 22:43:16 | 50 | |||
en18 | n0sk1ll | 2023-10-07 22:39:42 | 2817 | Tiny change: ' \equiv x (\mod p)$' -> ' \equiv x \ (\mod p)$' | ||
en17 | n0sk1ll | 2023-10-02 10:44:23 | 230 | |||
en16 | BULLMCHOW | 2023-10-02 09:32:30 | 37 | Tiny change: ' of $a_i$ after th' -> ' of $a_i$ to $\lfloor \frac{a_i}{m+1} \rfloor$ after th' | ||
en15 | BULLMCHOW | 2023-10-01 18:39:16 | 23 | |||
en14 | BULLMCHOW | 2023-10-01 18:36:19 | 8 | Tiny change: ' $a_i$ be divided into in' -> ' $a_i$ be splited into in' | ||
en13 | BULLMCHOW | 2023-10-01 18:32:14 | 224 | |||
en12 | BULLMCHOW | 2023-10-01 18:24:48 | 5 | Tiny change: 'we will solve the array' -> 'we will sort the array' | ||
en11 | BULLMCHOW | 2023-10-01 18:24:10 | 824 | |||
en10 | BULLMCHOW | 2023-10-01 17:59:57 | 4 | |||
en9 | BULLMCHOW | 2023-10-01 17:58:00 | 11 | Tiny change: '>\nAfter every operation the number of' -> '>\nAfter each operation number of' | ||
en8 | BULLMCHOW | 2023-10-01 17:57:04 | 105 | |||
en7 | BULLMCHOW | 2023-10-01 17:56:27 | 279 | |||
en6 | BULLMCHOW | 2023-10-01 17:47:08 | 25 | |||
en5 | BULLMCHOW | 2023-10-01 17:43:48 | 7 | Tiny change: ' subarray left from $a_' -> ' subarray right from $a_' | ||
en4 | BULLMCHOW | 2023-10-01 17:42:48 | 189 | |||
en3 | BULLMCHOW | 2023-10-01 17:33:21 | 45 | |||
en2 | n0sk1ll | 2023-10-01 14:34:31 | 239 | |||
en1 | n0sk1ll | 2023-10-01 14:31:01 | 1091 | Initial revision (saved to drafts) |
Name |
---|