Codeforces Round 934 (Div. 1)

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
1943 Codeforces Round 934 (Div. 1) FINISHED False 8700 21223499 March 16, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 803 ) D2 Counting Is Fun (Hard Version) PROGRAMMING combinatorics dp

B'This is the hard version of the problem. The only difference between the two versions is the constraint on n . You can make hacks only if both versions of the problem are solved. An array b of m non-negative integers is said to be good if all the elements of b can be made equal to 0 using the following operation some (possibly, zero) times: You are given two positive integers n , k and a prime number p . Over all (k+1)^n arrays of length n such that 0 <= q a_i <= q k for all 1 <= q i <= q n , count the number of good arrays. Since the number might be too large, you are only required to find it modulo p . Each test contains multiple test cases. The first line contains a single integer t ( 1 <= q t <= q 10^3 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains three positive integers n , k and p ( 3 <= q n <= q 3000 , 1 <= q k <= q n , 10^8 < p < 10^9 ) -- the length of the array a , the upper bound on the elements of a and modulus p . It is guaranteed that the sum of n^2 over all test cases does not exceed 10^7 , and p is prime. For each test case, on a new line, output the number of good arrays modulo p . In the first test case, the 4 good arrays a are: '...

Tutorials

Codeforces Round #934 (Div1, Div2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
251743677 Crystally D2 March 16, 2024, 3:25 p.m. OK C++14 (GCC 6-32) TESTS 21 93 204800
251806995 Kilani D2 March 16, 2024, 6:41 p.m. OK C++14 (GCC 6-32) TESTS 21 202 290508800
251850621 ZifanWang D2 March 17, 2024, 3:07 a.m. OK C++14 (GCC 6-32) TESTS 21 249 108441600
251857219 Celebrate D2 March 17, 2024, 4:29 a.m. OK C++14 (GCC 6-32) TESTS 21 343 102400
251761488 StarSilk D2 March 16, 2024, 3:52 p.m. OK C++14 (GCC 6-32) TESTS 21 421 144486400
251747275 crazy_sea D2 March 16, 2024, 3:30 p.m. OK C++14 (GCC 6-32) TESTS 21 483 201318400
251855160 honglan0301 D2 March 17, 2024, 4:06 a.m. OK C++14 (GCC 6-32) TESTS 21 577 144793600
251770959 honglan0301 D2 March 16, 2024, 4:10 p.m. OK C++14 (GCC 6-32) TESTS 21 717 144793600
251849947 ACOIer D2 March 17, 2024, 2:56 a.m. OK C++14 (GCC 6-32) TESTS 21 717 145203200
251852897 using233 D2 March 17, 2024, 3:37 a.m. OK C++14 (GCC 6-32) TESTS 21 748 365568000
251779625 never_giveup D2 March 16, 2024, 4:28 p.m. OK C++17 (GCC 7-32) TESTS 21 46 36352000
251749250 ecnerwala D2 March 16, 2024, 3:33 p.m. OK C++17 (GCC 7-32) TESTS 21 62 409600
251770430 PresentPassed D2 March 16, 2024, 4:09 p.m. OK C++17 (GCC 7-32) TESTS 21 62 36352000
251786760 daubi D2 March 16, 2024, 4:44 p.m. OK C++17 (GCC 7-32) TESTS 21 93 102400
251754334 AlternatingCurrent D2 March 16, 2024, 3:41 p.m. OK C++17 (GCC 7-32) TESTS 21 93 409600
251772375 xuanxuan001 D2 March 16, 2024, 4:13 p.m. OK C++17 (GCC 7-32) TESTS 21 93 72192000
251770572 Kude D2 March 16, 2024, 4:09 p.m. OK C++17 (GCC 7-32) TESTS 21 124 36352000
251808104 neal D2 March 16, 2024, 6:48 p.m. OK C++17 (GCC 7-32) TESTS 21 124 112947200
251833827 maroo1234 D2 March 16, 2024, 10:26 p.m. OK C++17 (GCC 7-32) TESTS 21 139 108544000
251747821 le0n D2 March 16, 2024, 3:31 p.m. OK C++17 (GCC 7-32) TESTS 21 140 108544000
251788113 iakovlev.zakhar D2 March 16, 2024, 4:48 p.m. OK Java 8 TESTS 21 748 144076800
251766547 arvindf232 D2 March 16, 2024, 4:01 p.m. OK Kotlin 1.7 TESTS 21 1060 328294400
251810543 shade34 D2 March 16, 2024, 7:03 p.m. OK PyPy 3-64 TESTS 21 311 10649600
251762391 conqueror_of_tourist D2 March 16, 2024, 3:54 p.m. OK PyPy 3-64 TESTS 21 1060 12492800
251780485 sansen D2 March 16, 2024, 4:30 p.m. OK Rust 2021 TESTS 21 62 102400

remove filters

Back to search problems