Codeforces Round 861 (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
1808 Codeforces Round 861 (Div. 2) FINISHED False 7200 57185663 March 29, 2023, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 711 ) E2 Minibuses on Venus (medium version) PROGRAMMING combinatorics divide and conquer dp matrices 2500

B"This is the medium version of the problem. The only difference between the three versions is the constraints on n and k . You can make hacks only if all versions of the problem are solved. Maxim is a minibus driver on Venus. To ride on Maxim's minibus, you need a ticket. Each ticket has a number consisting of n digits. However, as we know, the residents of Venus use a numeral system with base k , rather than the decimal system. Therefore, the ticket number can be considered as a sequence of n integers from 0 to k-1 , inclusive. The residents of Venus consider a ticket to be lucky if there is a digit on it that is equal to the sum of the remaining digits, modulo k . For example, if k=10 , then the ticket 7135 is lucky because 7 + 1 + 5 equiv 3 pmod{10} . On the other hand, the ticket 7136 is not lucky because no digit is equal to the sum of the others modulo 10 . Once, while on a trip, Maxim wondered: how many lucky tickets exist? At the same time, Maxim understands that this number can be very large, so he is interested only in the answer modulo some prime number m . The only line of the input contains three integers n , k and m ( 1 <= n <= 10^{18} , 1 <= k <= 100 , 10^8 <= m <= 10^9 + 7 , m is a prime number) -- the number of digits on the ticket, the base of the numeral system on Venus, and the module for answer calculation. Print one integer -- the number of lucky tickets modulo m , i. e. the remainder after dividing the answer by m . In the first example, there are only four lucky tickets: 000 , 011 , 101 , and 110 ."...

Tutorials

Codeforces Round #861 (Div. 2) editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
200069211 liaopengfei E2 April 1, 2023, 3:48 a.m. OK GNU C++14 TESTS 88 15 0 2500
199946808 Lucky_Glass E2 March 31, 2023, 12:51 p.m. OK GNU C++14 TESTS 88 15 0 2500
199909677 0wuming0 E2 March 31, 2023, 5:52 a.m. OK GNU C++14 TESTS 88 15 0 2500
199798460 caijianhong E2 March 30, 2023, 8:34 a.m. OK GNU C++14 TESTS 88 15 0 2500
199776164 mod998244353 E2 March 30, 2023, 3:13 a.m. OK GNU C++14 TESTS 87 998 0 2500
199773387 HakuroKawashiro E2 March 30, 2023, 2:12 a.m. OK GNU C++14 TESTS 87 1232 512000 2500
199906504 GK_Leo0 E2 March 31, 2023, 5:01 a.m. OK GNU C++14 TESTS 88 1497 0 2500
199769331 wythend E2 March 30, 2023, 12:39 a.m. OK GNU C++14 TESTS 87 1560 0 2500
199772766 Leasier E2 March 30, 2023, 1:59 a.m. OK GNU C++14 TESTS 87 1731 0 2500
199919776 SqrtSecond E2 March 31, 2023, 8:05 a.m. OK GNU C++14 TESTS 88 1762 204800 2500
199912515 hanchangseo E2 March 31, 2023, 6:27 a.m. OK GNU C++17 TESTS 88 15 0 2500
199900358 Arktomson E2 March 31, 2023, 2:50 a.m. OK GNU C++17 TESTS 88 15 0 2500
199827497 Sung.An E2 March 30, 2023, 1:14 p.m. OK GNU C++17 TESTS 88 15 0 2500
199772852 1459007298 E2 March 30, 2023, 2 a.m. OK GNU C++17 TESTS 87 15 0 2500
199770154 zft_4995 E2 March 30, 2023, 12:59 a.m. OK GNU C++17 TESTS 87 15 0 2500
199784109 Marckess E2 March 30, 2023, 5:35 a.m. OK GNU C++17 TESTS 88 15 204800 2500
199948612 Solashiro E2 March 31, 2023, 1:07 p.m. OK GNU C++17 TESTS 88 30 102400 2500
199772676 gabrielwu E2 March 30, 2023, 1:57 a.m. OK GNU C++17 TESTS 87 30 307200 2500
199757564 franv E2 March 29, 2023, 9:05 p.m. OK GNU C++17 TESTS 87 46 0 2500
199924115 E-ray E2 March 31, 2023, 8:57 a.m. OK GNU C++17 TESTS 88 982 0 2500
199775429 enslaved E2 March 30, 2023, 2:57 a.m. OK GNU C++17 (64) TESTS 87 15 0 2500
199768341 pigpigger E2 March 30, 2023, 12:15 a.m. OK GNU C++17 (64) TESTS 87 15 0 2500
199925341 Weobe E2 March 31, 2023, 9:11 a.m. OK GNU C++17 (64) TESTS 88 46 307200 2500
199819038 wygzgyw E2 March 30, 2023, 12:01 p.m. OK GNU C++17 (64) TESTS 88 156 0 2500
199874945 birka0 E2 March 30, 2023, 7:22 p.m. OK GNU C++17 (64) TESTS 88 249 204800 2500
199744923 MarcosK E2 March 29, 2023, 6:42 p.m. OK GNU C++17 (64) TESTS 87 265 204800 2500
199774982 dognotlike E2 March 30, 2023, 2:47 a.m. OK GNU C++17 (64) TESTS 87 577 2252800 2500
199788266 lunchbox E2 March 30, 2023, 6:33 a.m. OK GNU C++17 (64) TESTS 88 858 307200 2500
199872264 ahshafi E2 March 30, 2023, 6:47 p.m. OK GNU C++17 (64) TESTS 88 1091 921600 2500
199791879 Dominater069 E2 March 30, 2023, 7:15 a.m. OK GNU C++17 (64) TESTS 88 1248 307200 2500
200042464 36champ E2 March 31, 2023, 8:02 p.m. OK GNU C++20 (64) TESTS 88 15 0 2500
200040580 1RONMAN E2 March 31, 2023, 7:42 p.m. OK GNU C++20 (64) TESTS 88 15 0 2500
199944263 Chime E2 March 31, 2023, 12:27 p.m. OK GNU C++20 (64) TESTS 88 15 0 2500
199944137 wanghai673 E2 March 31, 2023, 12:25 p.m. OK GNU C++20 (64) TESTS 88 15 0 2500
199901833 Reanap E2 March 31, 2023, 3:22 a.m. OK GNU C++20 (64) TESTS 88 15 0 2500
199861644 gautamankoji E2 March 30, 2023, 5:08 p.m. OK GNU C++20 (64) TESTS 88 15 0 2500
199854244 yyf_0404 E2 March 30, 2023, 4:07 p.m. OK GNU C++20 (64) TESTS 88 15 0 2500
199832364 Fido_Puppy E2 March 30, 2023, 1:52 p.m. OK GNU C++20 (64) TESTS 88 15 0 2500
199828547 kmjp E2 March 30, 2023, 1:22 p.m. OK GNU C++20 (64) TESTS 88 15 0 2500
199804304 superguymj E2 March 30, 2023, 9:38 a.m. OK GNU C++20 (64) TESTS 88 15 0 2500
199759555 dzhi E2 March 29, 2023, 9:30 p.m. OK Java 11 TESTS 87 171 0 2500
199949154 sasikirannallapu E2 March 31, 2023, 1:12 p.m. OK Java 11 TESTS 88 888 0 2500
199917934 bvf E2 March 31, 2023, 7:39 a.m. OK PyPy 3 TESTS 88 93 1740800 2500
199770344 bronze_coder E2 March 30, 2023, 1:03 a.m. OK PyPy 3-64 TESTS 87 62 0 2500
199742225 hxu10 E2 March 29, 2023, 6:13 p.m. OK PyPy 3-64 TESTS 87 2713 4812800 2500

remove filters

Back to search problems