Educational Codeforces Round 164 (Rated for Div. 2)

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
1954 Educational Codeforces Round 164 (Rated for Div. 2) FINISHED False 7200 24247463 April 12, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 265 ) F Unique Strings PROGRAMMING combinatorics dp math

B"Let's say that two strings a and b are equal if you can get the string b by cyclically shifting string a . For example, the strings 0100110 and 1100100 are equal, while 1010 and 1100 are not. You are given a binary string s of length n . Its first c characters are 1-s, and its last n - c characters are 0-s. In one operation, you can replace one 0 with 1. Calculate the number of unique strings you can get using no more than k operations. Since the answer may be too large, print it modulo 10^9 + 7 . The first and only line contains three integers n , c and k ( 1 <= n <= 3000 ; 1 <= c <= n ; 0 <= k <= n - c ) -- the length of string s , the length of prefix of 1-s and the maximum number of operations. Print the single integer -- the number of unique strings you can achieve performing no more than k operations, modulo 10^9 + 7 . In the first test case, the only possible string is 1. In the second test case, the possible strings are: 100, 110, and 111. String 101 is equal to 110, so we don't count it. In the third test case, the possible strings are: 10000, 11000, 10100. String 10010 is equal to 10100, and 10001 is equal to 11000. "...

Tutorials

Educational Codeforces Round 164 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
256368912 StarSilk F April 12, 2024, 6:32 p.m. OK C++14 (GCC 6-32) TESTS 86 296 204800
256372395 potato167 F April 12, 2024, 7:05 p.m. OK C++17 (GCC 7-32) TESTS 86 93 35737600
256362163 Sparkle_Twilight F April 12, 2024, 5:33 p.m. OK C++17 (GCC 7-32) TESTS 86 233 9728000
256355993 BSpioneer F April 12, 2024, 4:52 p.m. OK C++17 (GCC 7-32) TESTS 86 249 181043200
256362277 feeder1 F April 12, 2024, 5:34 p.m. OK C++17 (GCC 7-32) TESTS 86 280 217292800
256356175 Andreasyan F April 12, 2024, 4:52 p.m. OK C++17 (GCC 7-32) TESTS 86 421 36249600
256362989 Fysty F April 12, 2024, 5:40 p.m. OK C++17 (GCC 7-32) TESTS 86 468 144896000
256355472 Cubyte F April 12, 2024, 4:49 p.m. OK C++17 (GCC 7-32) TESTS 86 561 144486400
256398694 415411 F April 13, 2024, 3:06 a.m. OK C++20 (GCC 13-64) TESTS 86 77 204800
256398473 415411 F April 13, 2024, 3:02 a.m. OK C++20 (GCC 13-64) TESTS 86 93 102400
256352666 cpchenpi F April 12, 2024, 4:36 p.m. OK C++20 (GCC 13-64) TESTS 86 93 102400
256403105 A_G F April 13, 2024, 4:16 a.m. OK C++20 (GCC 13-64) TESTS 86 108 102400
256359971 sg78276397 F April 12, 2024, 5:16 p.m. OK C++20 (GCC 13-64) TESTS 86 108 9625600
256353574 changzhou F April 12, 2024, 4:40 p.m. OK C++20 (GCC 13-64) TESTS 86 109 72806400
256403265 A_G F April 13, 2024, 4:18 a.m. OK C++20 (GCC 13-64) TESTS 86 124 102400
256355817 cheating_detetctor F April 12, 2024, 4:51 p.m. OK C++20 (GCC 13-64) TESTS 86 139 35840000
256398383 Nero F April 13, 2024, 3 a.m. OK C++20 (GCC 13-64) TESTS 86 140 35840000
256401086 hhhgjyismine F April 13, 2024, 3:45 a.m. OK C++20 (GCC 13-64) TESTS 86 155 73728000
256391491 kto_eto F April 13, 2024, 12:25 a.m. OK PyPy 3-64 TESTS 86 390 163123200
256397851 el_tunel F April 13, 2024, 2:50 a.m. OK PyPy 3-64 TESTS 86 405 149913600

remove filters

Back to search problems