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 |
|---|---|---|---|---|---|---|
| 2150 | Codeforces Round 1053 (Div. 1) | FINISHED | False | 11700 | 17691923 | Sept. 24, 2025, 11:35 a.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 80 ) | G | Counting Is Fun: The Finale | PROGRAMMING |
You are given three positive integers (x), (y), and (k). You are also given a binary string(^{\text{∗}}) (a) ((|a| = x + y)). Count the number of binary strings (b), modulo (998\,244\,353), such that: there are exactly (x) (\mathtt{0}) in (b). there are exactly (y) (\mathtt{1}) in (b). there exists an integer (i) ((1 \leq i \leq x + y - 1)) such that (\min \left( f(b_1 b_2 \ldots b_i), f(b_{i+1} b_{i+2} \ldots b_{x+y})\right) \geq k), where (f(s)) gives the length of the longest non-decreasing subsequence(^{\text{†}}) in (s). (b) is lexicographically larger(^{\text{‡}}) than (a). (^{\text{∗}})A binary string is a string that only consists of characters (\mathtt{0}) and (\mathtt{1}). (^{\text{†}})A sequence (a) is a subsequence of a sequence (b) if (a) can be obtained from (b) by the deletion of several (possibly, zero or all) elements. For example, subsequences of (\mathtt{1011101}) are (\mathtt{0}), (\mathtt{1}), (\mathtt{11111}), (\mathtt{0111}), but not (\mathtt{000}) nor (\mathtt{11100}). (^{\text{‡}})A string (p) is lexicographically larger than another string (q) if and only if one of the following holds: (q) is a prefix of (p), but (p \ne q); or in the first position where (p) and (q) differ, the string (p) has a larger element than the corresponding element in (q). Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 5000)). The description of the test cases follows. The first line of each test case contains three integers (x), (y), and (k) ((1 \le x, y \le 5000), (1 \leq k < x + y)). The second line of each test case contains a binary string (a) ((|a| = x+y)) consisting of characters (\mathtt{0}) and (\mathtt{1}). It is guaranteed that neither the sum of (x) |
| Editorial of Codeforces Round 1053 (Div. 1, Div. 2) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 340264138 | Geothermal | G | Sept. 24, 2025, 10:39 p.m. | OK | C++20 (GCC 13-64) | TESTS | 66 | 811 | 402739200 | ||
| 340239230 | ecnerwala | G | Sept. 24, 2025, 5:54 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 66 | 1718 | 397107200 | ||
| 340277827 | le0n | G | Sept. 25, 2025, 2:43 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 66 | 2046 | 401408000 | ||
| 340265877 | OpGm | G | Sept. 24, 2025, 11:30 p.m. | OK | PyPy 3-64 | TESTS | 66 | 3828 | 209408000 |
Back to search problems