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 |
|---|---|---|---|---|---|---|
| 2229 | Spectral::Cup 2026 Round 2 (Codeforces Round 1100, Div. 1 + Div. 2) | FINISHED | False | 10800 | 833086 | May 23, 2026, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 135 ) | H | Wowee Binary String | PROGRAMMING | combinatorics dp strings |
You find yourself with a string (s) of length (n) consisting of only the characters (0), (1) and (?). In other words, (s) is an incomplete binary string. You will do the following operations in order: replace all (?) in (s) with either (0) or (1). then repeat the following any number of times (possibly none): select a substring of (s) with an even number of occurrences of the character (1) and delete it. More formally, select two integers (l), (r) where (1 \le l \le r \le |s|) and (1) occurs in (s_l,s_{l + 1},\ldots,s_r) an even number of times, then replace (s) with (s_1,\ldots,s_{l - 1},s_{r + 1},\ldots,s_{|s|}) select a substring of (s) with an even number of occurrences of the character (1) and delete it. More formally, select two integers (l), (r) where (1 \le l \le r \le |s|) and (1) occurs in (s_l,s_{l + 1},\ldots,s_r) an even number of times, then replace (s) with (s_1,\ldots,s_{l - 1},s_{r + 1},\ldots,s_{|s|}) Find how many different binary strings can be obtained after performing the operations. As the number could be humungous, find it modulo (998\,244\,353). Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 100)). The description of the test cases follows. The first line of each testcase contains an integer (n) ((1 \le n \le 3000)) — the length of the string. The second line of each test case contains the incomplete binary string (s). It is guaranteed that the sum of (n) over all test cases does not exceed (3000). For each testcase, output the number of binary strings that can be obtained, modulo (998\,244\,353). In the first two testcases, any binary string of length no longer than (n) can be made. In the third testcase, the following strings can be |
| Spectral::Cup 2026 Round 2 (Codeforces Round 1100, 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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 375860357 | jeetganatra | H | May 23, 2026, 7:15 p.m. | OK | C++17 (GCC 7-32) | TESTS | 22 | 93 | 32460800 | ||
| 375879941 | didxga | H | May 24, 2026, 2:01 a.m. | OK | C++17 (GCC 7-32) | TESTS | 23 | 93 | 36352000 | ||
| 375874591 | vgo96 | H | May 23, 2026, 10:38 p.m. | OK | C++17 (GCC 7-32) | TESTS | 22 | 93 | 36352000 | ||
| 375884450 | oceeff | H | May 24, 2026, 3:48 a.m. | OK | C++17 (GCC 7-32) | TESTS | 23 | 203 | 38604800 | ||
| 375863791 | linyue | H | May 23, 2026, 7:50 p.m. | OK | C++17 (GCC 7-32) | TESTS | 22 | 546 | 155852800 |
Back to search problems