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 |
---|---|---|---|---|---|---|
1920 | Codeforces Round 919 (Div. 2) | FINISHED | False | 7200 | 32023463 | Jan. 13, 2024, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 2810 ) | E | Counting Binary Strings | PROGRAMMING | combinatorics dp math strings |
B'Patrick calls a substring ^ dagger of a binary string ^ ddagger good if this substring contains exactly one 1. Help Patrick count the number of binary strings s such that s contains exactly n good substrings and has no good substring of length strictly greater than k . Note that substrings are differentiated by their location in the string, so if s = 1010 you should count both occurrences of 10. ^ dagger A string a is a substring of a string b if a can be obtained from b by the deletion of several (possibly, zero or all) characters from the beginning and several (possibly, zero or all) characters from the end. ^ ddagger A binary string is a string that only contains the characters 0 and 1. Each test consists of multiple test cases. The first line contains a single integer t ( 1 <= q t <= q 2500 ) -- the number of test cases. The description of the test cases follows. The only line of each test case contains two integers n and k ( 1 <= q n <= q 2500 , 1 <= q k <= q n ) -- the number of required good substrings and the maximum allowed length of a good substring. It is guaranteed that the sum of n over all test cases does not exceed 2500 . For each test case, output a single integer -- the number of binary strings s such that s contains exactly n good substrings and has no good substring of length strictly greater than k . Since this integer can be too large, output it modulo 998 ,244 ,353 . In the first test case, the only suitable binary string is 1. String 01 is not suitable because it contains a substring 01 with length 2 > 1 . In the second test case, suitable binary strings are 011, 110 and 111. In the third test case, suitable binary strings are 101, 0110, 0111, 1110, and 1111. '... |
Editorial for Codeforces Round #919 (Div. 2) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
241495055 | menezesd2 | E | Jan. 13, 2024, 5:52 p.m. | OK | GNU C11 | TESTS | 26 | 124 | 25292800 | ||
241515470 | EvenToWorldFinal | E | Jan. 13, 2024, 11:43 p.m. | OK | GNU C++14 | TESTS | 26 | 124 | 25190400 | ||
241520512 | CCCCOrz | E | Jan. 14, 2024, 2:36 a.m. | OK | GNU C++14 | TESTS | 26 | 124 | 25190400 | ||
241480976 | 2016smy | E | Jan. 13, 2024, 4:24 p.m. | OK | GNU C++14 | TESTS | 26 | 140 | 36761600 | ||
241482441 | trp_hy | E | Jan. 13, 2024, 4:27 p.m. | OK | GNU C++14 | TESTS | 26 | 156 | 25190400 | ||
241494333 | bktl1love | E | Jan. 13, 2024, 5:47 p.m. | OK | GNU C++14 | TESTS | 26 | 171 | 24985600 | ||
241507886 | buko | E | Jan. 13, 2024, 8:20 p.m. | OK | GNU C++14 | TESTS | 26 | 171 | 26112000 | ||
241492852 | Arti1990 | E | Jan. 13, 2024, 5:37 p.m. | OK | GNU C++14 | TESTS | 26 | 187 | 72499200 | ||
241523388 | Hurrikale | E | Jan. 14, 2024, 3:40 a.m. | OK | GNU C++14 | TESTS | 26 | 202 | 50073600 | ||
241503771 | TrendBattles | E | Jan. 13, 2024, 7:21 p.m. | OK | GNU C++14 | TESTS | 26 | 233 | 26419200 | ||
241493283 | honey | E | Jan. 13, 2024, 5:40 p.m. | OK | GNU C++14 | TESTS | 26 | 280 | 50278400 | ||
241511890 | chenreddy | E | Jan. 13, 2024, 9:39 p.m. | OK | GNU C++17 | TESTS | 26 | 124 | 25088000 | ||
241480000 | KroosTheKeenGlint | E | Jan. 13, 2024, 4:22 p.m. | OK | GNU C++17 | TESTS | 26 | 124 | 25190400 | ||
241509000 | Md._Nahid_Ullah_Joy | E | Jan. 13, 2024, 8:39 p.m. | OK | GNU C++17 | TESTS | 26 | 140 | 25088000 | ||
241481637 | Ste | E | Jan. 13, 2024, 4:26 p.m. | OK | GNU C++17 | TESTS | 26 | 140 | 25190400 | ||
241488785 | sixplusfour | E | Jan. 13, 2024, 5:16 p.m. | OK | GNU C++17 | TESTS | 26 | 156 | 25190400 | ||
241482634 | Muelsyse_sep003 | E | Jan. 13, 2024, 4:28 p.m. | OK | GNU C++17 | TESTS | 26 | 156 | 25190400 | ||
241489994 | Koyote | E | Jan. 13, 2024, 5:21 p.m. | OK | GNU C++17 | TESTS | 26 | 156 | 25190400 | ||
241488671 | Kogut_Ivan | E | Jan. 13, 2024, 5:16 p.m. | OK | GNU C++17 | TESTS | 26 | 156 | 26419200 | ||
241497248 | aangairbender | E | Jan. 13, 2024, 6:10 p.m. | OK | GNU C++17 | TESTS | 26 | 171 | 25088000 | ||
241495127 | happy_node | E | Jan. 13, 2024, 5:53 p.m. | OK | GNU C++17 | TESTS | 26 | 171 | 25190400 | ||
241525946 | xiaossr | E | Jan. 14, 2024, 4:32 a.m. | OK | GNU C++17 (64) | TESTS | 26 | 93 | 25190400 | ||
241482062 | _Monaco_ | E | Jan. 13, 2024, 4:27 p.m. | OK | GNU C++17 (64) | TESTS | 26 | 93 | 25497600 | ||
241505226 | MarcosK | E | Jan. 13, 2024, 7:41 p.m. | OK | GNU C++17 (64) | TESTS | 26 | 108 | 25292800 | ||
241481503 | _chroneZ | E | Jan. 13, 2024, 4:25 p.m. | OK | GNU C++17 (64) | TESTS | 26 | 109 | 25292800 | ||
241517030 | BerryPie | E | Jan. 14, 2024, 12:55 a.m. | OK | GNU C++17 (64) | TESTS | 26 | 124 | 25190400 | ||
241520936 | enslaved | E | Jan. 14, 2024, 2:46 a.m. | OK | GNU C++17 (64) | TESTS | 26 | 124 | 26521600 | ||
241501319 | Sandeep_P | E | Jan. 13, 2024, 6:50 p.m. | OK | GNU C++17 (64) | TESTS | 26 | 124 | 26521600 | ||
241520951 | lhy123 | E | Jan. 14, 2024, 2:46 a.m. | OK | GNU C++17 (64) | TESTS | 26 | 139 | 28672000 | ||
241484415 | MehrdadM | E | Jan. 13, 2024, 4:32 p.m. | OK | GNU C++17 (64) | TESTS | 26 | 139 | 50483200 | ||
241494610 | waipoli | E | Jan. 13, 2024, 5:49 p.m. | OK | GNU C++17 (64) | TESTS | 26 | 140 | 26521600 | ||
241520924 | dingduangdou | E | Jan. 14, 2024, 2:46 a.m. | OK | GNU C++20 (64) | TESTS | 26 | 108 | 25088000 | ||
241512493 | Frus | E | Jan. 13, 2024, 9:55 p.m. | OK | GNU C++20 (64) | TESTS | 26 | 109 | 24985600 | ||
241495203 | menezesd2 | E | Jan. 13, 2024, 5:53 p.m. | OK | GNU C++20 (64) | TESTS | 26 | 109 | 24985600 | ||
241481020 | JHSeng | E | Jan. 13, 2024, 4:24 p.m. | OK | GNU C++20 (64) | TESTS | 26 | 109 | 25088000 | ||
241494633 | menezesd2 | E | Jan. 13, 2024, 5:49 p.m. | OK | GNU C++20 (64) | TESTS | 26 | 109 | 25088000 | ||
241490011 | jay_jayjay | E | Jan. 13, 2024, 5:22 p.m. | OK | GNU C++20 (64) | TESTS | 26 | 109 | 25088000 | ||
241522942 | zuhazuhazuha | E | Jan. 14, 2024, 3:31 a.m. | OK | GNU C++20 (64) | TESTS | 26 | 109 | 25190400 | ||
241490012 | momohara | E | Jan. 13, 2024, 5:22 p.m. | OK | GNU C++20 (64) | TESTS | 26 | 109 | 26521600 | ||
241518071 | andycoke | E | Jan. 14, 2024, 1:31 a.m. | OK | GNU C++20 (64) | TESTS | 26 | 124 | 24985600 | ||
241521969 | HaHeHyt | E | Jan. 14, 2024, 3:08 a.m. | OK | GNU C++20 (64) | TESTS | 26 | 124 | 25190400 | ||
241484033 | yvbf | E | Jan. 13, 2024, 4:31 p.m. | OK | Java 8 | TESTS | 26 | 701 | 79360000 | ||
241520332 | nonrice | E | Jan. 14, 2024, 2:31 a.m. | OK | PyPy 3 | TESTS | 26 | 607 | 29798400 | ||
241499459 | titia | E | Jan. 13, 2024, 6:31 p.m. | OK | PyPy 3-64 | TESTS | 26 | 592 | 54784000 | ||
241493217 | cybsbbb | E | Jan. 13, 2024, 5:39 p.m. | OK | PyPy 3-64 | TESTS | 26 | 655 | 118374400 | ||
241488480 | yuki_keshiki | E | Jan. 13, 2024, 5:16 p.m. | OK | PyPy 3-64 | TESTS | 26 | 670 | 53862400 | ||
241493552 | cybsbbb | E | Jan. 13, 2024, 5:41 p.m. | OK | PyPy 3-64 | TESTS | 26 | 670 | 118476800 | ||
241494274 | aPNJ777 | E | Jan. 13, 2024, 5:47 p.m. | OK | PyPy 3-64 | TESTS | 26 | 686 | 53452800 | ||
241490248 | shash4321 | E | Jan. 13, 2024, 5:22 p.m. | OK | PyPy 3-64 | TESTS | 26 | 717 | 194764800 | ||
241493517 | sushmanth.dampur8780 | E | Jan. 13, 2024, 5:41 p.m. | OK | PyPy 3-64 | TESTS | 26 | 779 | 53862400 | ||
241532228 | Slamur | E | Jan. 14, 2024, 6:01 a.m. | OK | PyPy 3-64 | TESTS | 26 | 826 | 53555200 | ||
241511795 | r57shell | E | Jan. 13, 2024, 9:36 p.m. | OK | PyPy 3-64 | TESTS | 26 | 982 | 53964800 | ||
241518565 | Spheniscine | E | Jan. 14, 2024, 1:46 a.m. | OK | Rust 2021 | TESTS | 26 | 124 | 25190400 | ||
241518286 | Spheniscine | E | Jan. 14, 2024, 1:38 a.m. | OK | Rust 2021 | TESTS | 26 | 124 | 25190400 | ||
241515838 | menezesd2 | E | Jan. 14, 2024, midnight | OK | Rust 2021 | TESTS | 26 | 264 | 50380800 |
Back to search problems