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 |
|---|---|---|---|---|---|---|
| 2190 | Codeforces Round 1073 (Div. 1) | FINISHED | False | 10800 | 7745123 | Jan. 17, 2026, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 3143 ) | B2 | Sub-RBS (Hard Version) | PROGRAMMING | combinatorics dp games implementation matrices strings |
This is the hard version of the problem. The difference between the versions is that in this version, you need to find the sum of scores over all subsequences of (s); (s) is not necessarily a regular bracket sequence , and the constraints on (n) are lower . We say that a bracket sequence (a) is better than a bracket sequence (b) if one of the following holds: (b) is a prefix of (a), but (a \ne b); or let (i) be the first position (if it exists) where (a_i \neq b_i), then (\color{red}{a_i = (}) and (\color{red}{b_i = )}). For an arbitrary bracket sequence (t), we define its score in the following way: If (t) is not a regular bracket sequence (^{\text{∗}}), the score is (0). If there exists a regular bracket subsequence (^{\text{†}}) (r) of (t) such that (r) is better than (t), then the score is equal to the maximum value of (|r|) over all such subsequences (r). Otherwise, the score is (0). In other words, the score of (t) is the length of the longest regular bracket subsequence of (t) which is better than (t). If (t) is not a regular bracket sequence, or if no regular subsequence better than (t) exists, the score is (0). You are given a bracket sequence (s) of length (n). Find the sum of the scores of all non-empty subsequences of (s) modulo (998\,244\,353). (^{\text{∗}})A regular bracket sequence is a bracket sequence that can be transformed into a correct arithmetic expression by inserting the characters (1) and (+) between the original characters of the sequence. For example: bracket sequences (()()) and ((())) are regular (the resulting expressions are ((1)+(1)) and (((1+1)+1))); bracket sequences ()(), ((), and ()) are not. (^{\text{†}})A sequence (a) is a subsequence of a s |
| Codeforces Round 1073 (Div. 1, Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 358328150 | _stdout_ | B2 | Jan. 17, 2026, 3:53 p.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 31 | 409600 | ||
| 358311881 | kalimm | B2 | Jan. 17, 2026, 3:28 p.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 31 | 409600 | ||
| 358395620 | dkedu | B2 | Jan. 18, 2026, 12:40 a.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 46 | 102400 | ||
| 358385164 | Mario. | B2 | Jan. 17, 2026, 8:12 p.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 46 | 102400 | ||
| 358377884 | Harigton | B2 | Jan. 17, 2026, 7 p.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 46 | 102400 | ||
| 358366498 | Nickir | B2 | Jan. 17, 2026, 5:27 p.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 46 | 102400 | ||
| 358353160 | kikitop1gg | B2 | Jan. 17, 2026, 4:47 p.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 46 | 102400 | ||
| 358336879 | alex-yandex | B2 | Jan. 17, 2026, 4:10 p.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 46 | 102400 | ||
| 358327849 | qawszx | B2 | Jan. 17, 2026, 3:53 p.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 46 | 102400 | ||
| 358321202 | Tian_Ming_Yo | B2 | Jan. 17, 2026, 3:42 p.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 46 | 102400 | ||
| 358357510 | MysticMavericks | B2 | Jan. 17, 2026, 4:59 p.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 31 | 0 | ||
| 358327740 | Caylex | B2 | Jan. 17, 2026, 3:53 p.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 31 | 102400 | ||
| 358401762 | Tobo | B2 | Jan. 18, 2026, 3:29 a.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 31 | 409600 | ||
| 358411427 | Snow_Lyric | B2 | Jan. 18, 2026, 5:53 a.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 31 | 1433600 | ||
| 358354526 | egneeS | B2 | Jan. 17, 2026, 4:51 p.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 31 | 4198400 | ||
| 358383759 | lbm47 | B2 | Jan. 17, 2026, 7:57 p.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 46 | 0 | ||
| 358374594 | mwen | B2 | Jan. 17, 2026, 6:35 p.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 46 | 0 | ||
| 358359042 | Apteryxx | B2 | Jan. 17, 2026, 5:04 p.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 46 | 0 | ||
| 358358985 | din2009siuc | B2 | Jan. 17, 2026, 5:04 p.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 46 | 0 | ||
| 358355598 | mwen | B2 | Jan. 17, 2026, 4:54 p.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 46 | 0 | ||
| 358315859 | Brinton | B2 | Jan. 17, 2026, 3:34 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 28 | 31 | 0 | ||
| 358392165 | yutabi | B2 | Jan. 17, 2026, 10:12 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 28 | 31 | 102400 | ||
| 358343591 | carcinisation | B2 | Jan. 17, 2026, 4:24 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 28 | 31 | 102400 | ||
| 358337914 | Tenshi0x0 | B2 | Jan. 17, 2026, 4:12 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 28 | 31 | 102400 | ||
| 358317984 | RockSnow | B2 | Jan. 17, 2026, 3:37 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 28 | 31 | 102400 | ||
| 358310593 | SummitClimbingDevil | B2 | Jan. 17, 2026, 3:27 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 28 | 31 | 102400 | ||
| 358296417 | Nyaan | B2 | Jan. 17, 2026, 3:09 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 28 | 31 | 102400 | ||
| 358317815 | ta2ly.id | B2 | Jan. 17, 2026, 3:37 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 28 | 31 | 204800 | ||
| 358317093 | FurinaHateComma | B2 | Jan. 17, 2026, 3:36 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 28 | 31 | 409600 | ||
| 358334435 | Timothy07 | B2 | Jan. 17, 2026, 4:05 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 28 | 31 | 716800 | ||
| 358295678 | hos.lyric | B2 | Jan. 17, 2026, 3:08 p.m. | OK | D | TESTS | 28 | 31 | 2764800 | ||
| 358352668 | Ritwin | B2 | Jan. 17, 2026, 4:46 p.m. | OK | GNU C11 | TESTS | 28 | 46 | 512000 | ||
| 358312651 | pengin_2000 | B2 | Jan. 17, 2026, 3:29 p.m. | OK | GNU C11 | TESTS | 28 | 62 | 409600 | ||
| 358305466 | showtime | B2 | Jan. 17, 2026, 3:20 p.m. | OK | Go | TESTS | 28 | 46 | 716800 | ||
| 358294579 | scau_accepted | B2 | Jan. 17, 2026, 3:06 p.m. | OK | Go | TESTS | 28 | 62 | 4608000 | ||
| 358304868 | MBBN | B2 | Jan. 17, 2026, 3:19 p.m. | OK | Java 21 | TESTS | 28 | 234 | 614400 | ||
| 358348920 | lybord | B2 | Jan. 17, 2026, 4:36 p.m. | OK | Java 21 | TESTS | 28 | 250 | 512000 | ||
| 358362365 | malachi_toney_goat | B2 | Jan. 17, 2026, 5:14 p.m. | OK | Java 8 | TESTS | 28 | 437 | 76902400 | ||
| 358292185 | Tlatoani | B2 | Jan. 17, 2026, 3:04 p.m. | OK | Kotlin 2.2 | TESTS | 28 | 484 | 103116800 | ||
| 358330301 | bcollet | B2 | Jan. 17, 2026, 3:57 p.m. | OK | PyPy 2 | TESTS | 28 | 156 | 4403200 | ||
| 358292349 | lunyi | B2 | Jan. 17, 2026, 3:04 p.m. | OK | PyPy 3-64 | TESTS | 28 | 109 | 3174400 | ||
| 358324043 | Ergodic137 | B2 | Jan. 17, 2026, 3:46 p.m. | OK | PyPy 3-64 | TESTS | 28 | 109 | 4300800 | ||
| 358316419 | hitman_py | B2 | Jan. 17, 2026, 3:35 p.m. | OK | PyPy 3-64 | TESTS | 28 | 109 | 5529600 | ||
| 358314208 | code_eraser | B2 | Jan. 17, 2026, 3:32 p.m. | OK | PyPy 3-64 | TESTS | 28 | 109 | 265932800 | ||
| 358330536 | Emikooh | B2 | Jan. 17, 2026, 3:57 p.m. | OK | PyPy 3-64 | TESTS | 28 | 125 | 3686400 | ||
| 358332596 | kdy8128 | B2 | Jan. 17, 2026, 4:01 p.m. | OK | PyPy 3-64 | TESTS | 28 | 125 | 5324800 | ||
| 358289054 | baldycape37 | B2 | Jan. 17, 2026, 3:01 p.m. | OK | PyPy 3-64 | TESTS | 28 | 125 | 13926400 | ||
| 358295359 | literalchild | B2 | Jan. 17, 2026, 3:07 p.m. | OK | PyPy 3-64 | TESTS | 28 | 140 | 3174400 | ||
| 358334666 | shade34 | B2 | Jan. 17, 2026, 4:05 p.m. | OK | PyPy 3-64 | TESTS | 28 | 140 | 3788800 | ||
| 358384995 | SnowLucario_Z | B2 | Jan. 17, 2026, 8:10 p.m. | OK | PyPy 3-64 | TESTS | 28 | 140 | 7782400 | ||
| 358407826 | Abhi_Dex | B2 | Jan. 18, 2026, 5:13 a.m. | OK | Python 3 | TESTS | 28 | 62 | 204800 | ||
| 358316255 | rusters | B2 | Jan. 17, 2026, 3:35 p.m. | OK | Rust 2021 | TESTS | 28 | 46 | 0 | ||
| 358302110 | sansen | B2 | Jan. 17, 2026, 3:15 p.m. | OK | Rust 2021 | TESTS | 28 | 46 | 2252800 | ||
| 358307427 | Solalyth | B2 | Jan. 17, 2026, 3:22 p.m. | OK | Rust 2021 | TESTS | 28 | 62 | 13721600 | ||
| 358302925 | MoSooN | B2 | Jan. 17, 2026, 3:16 p.m. | OK | Rust 2021 | TESTS | 28 | 140 | 1126400 | ||
| 358294210 | Mon_ster | B2 | Jan. 17, 2026, 3:06 p.m. | OK | Rust 2024 | TESTS | 28 | 31 | 0 | ||
| 358353453 | Darknef | B2 | Jan. 17, 2026, 4:48 p.m. | OK | Rust 2024 | TESTS | 28 | 46 | 11673600 | ||
| 358288584 | Sugar_fan | B2 | Jan. 17, 2026, 3 p.m. | OK | Rust 2024 | TESTS | 28 | 62 | 0 |
Back to search problems