Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.
ContestId |
Name |
Phase |
Frozen |
Duration (Seconds) |
Relative Time |
Start Time |
|---|---|---|---|---|---|---|
| 2046 | Codeforces Round 990 (Div. 1) | FINISHED | False | 7200 | 43198523 | Dec. 3, 2024, 6:25 a.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 132 ) | F1 | Yandex Cuneiform (Easy Version) | PROGRAMMING | constructive algorithms data structures greedy |
This is the easy version of the problem. The difference between the versions is that in this version, there are no question marks. You can hack only if you solved all versions of this problem. For a long time, no one could decipher Sumerian cuneiform. However, it has finally succumbed to pressure! Today, you have the chance to decipher Yandex cuneiform. Yandex cuneiform is defined by the following rules: An empty string is a Yandex cuneiform. If you insert exactly one copy of each of the three letters ' Y ', ' D ', and ' X ' into a Yandex cuneiform in such a way that no two adjacent letters become equal after the operation, you obtain a Yandex cuneiform. If a string can't be obtained using the above rules, it is not a Yandex cuneiform. You are given a template. A template is a string consisting of the characters ' Y ', ' D ', ' X ', and ' ? '. You need to check whether there exists a way to replace each question mark with ' Y ', ' D ', or ' X ' to obtain a Yandex cuneiform, and if it exists, output any of the matching options, as well as a sequence of insertion operations to obtain the resulting cuneiform. In this version of the problem, there are no question marks in the template. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 5 \cdot 10^4)). The description of the test cases follows. Each test case consists of a single line containing a template of length (n) ((3 \leq n < 2 \cdot 10^5), (n \bmod 3 = 0)), consisting only of characters ' Y ', ' D ', ' X '. It is guaranteed that the sum of (n) over all test cases does not exceed (2 \cdot 10^5). For each test case, output a single line containing ' NO ' if it is not possible to obtain a cuneiform from the given template. Otherwise, output ' YES ' on the first line, and on the second line, any obtainable cuneiform. After that, you need to output the sequence of operations that leads to the cuneiform you printed. A sequence |
| Разбор Codeforces Round 990 (Div. 2 + Div. 1) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 294575826 | PEIMUDA | F1 | Dec. 3, 2024, 7:55 a.m. | OK | C++17 (GCC 7-32) | TESTS | 67 | 265 | 10854400 | ||
| 294714392 | PurpleCrayon | F1 | Dec. 4, 2024, 4:38 a.m. | OK | C++17 (GCC 7-32) | TESTS | 67 | 343 | 15257600 | ||
| 294660170 | SirTechnical | F1 | Dec. 3, 2024, 4:50 p.m. | OK | C++20 (GCC 13-64) | TESTS | 67 | 124 | 5324800 | ||
| 294721059 | hitonanode | F1 | Dec. 4, 2024, 6:03 a.m. | OK | C++20 (GCC 13-64) | TESTS | 67 | 171 | 1638400 | ||
| 294569285 | ainta | F1 | Dec. 3, 2024, 7:38 a.m. | OK | C++20 (GCC 13-64) | TESTS | 67 | 218 | 7475200 | ||
| 294582369 | Sulfox | F1 | Dec. 3, 2024, 8:16 a.m. | OK | C++20 (GCC 13-64) | TESTS | 67 | 234 | 13209600 | ||
| 294574079 | antontrygubO_o | F1 | Dec. 3, 2024, 7:51 a.m. | OK | C++20 (GCC 13-64) | TESTS | 67 | 281 | 12492800 | ||
| 294714414 | maspy | F1 | Dec. 4, 2024, 4:38 a.m. | OK | C++20 (GCC 13-64) | TESTS | 67 | 374 | 60620800 | ||
| 294678579 | jqdai0815 | F1 | Dec. 3, 2024, 7:07 p.m. | OK | C++20 (GCC 13-64) | TESTS | 67 | 500 | 19660800 | ||
| 294624861 | lexiyvv | F1 | Dec. 3, 2024, 1:21 p.m. | OK | C++20 (GCC 13-64) | TESTS | 67 | 515 | 29491200 | ||
| 294610719 | E869120 | F1 | Dec. 3, 2024, 12:04 p.m. | OK | C++20 (GCC 13-64) | TESTS | 67 | 1328 | 32256000 | ||
| 294637614 | 244mhq | F1 | Dec. 3, 2024, 2:30 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 67 | 108 | 17510400 | ||
| 294718466 | Benq | F1 | Dec. 4, 2024, 5:34 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 67 | 359 | 68198400 | ||
| 294685906 | green_gold_dog | F1 | Dec. 3, 2024, 8:24 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 67 | 421 | 42291200 | ||
| 294716039 | Benq | F1 | Dec. 4, 2024, 5:02 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 67 | 1421 | 28262400 |
Back to search problems