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 51742499 March 29, 2023, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 447 ) E3 Minibuses on Venus (hard version) PROGRAMMING brute force combinatorics dp math 2800

B"This is the hard 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 <= 2000 , 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
200015588 2000030309_geethika E3 March 31, 2023, 4:27 p.m. OK GNU C++14 TESTS 95 15 0 2800
199946896 Lucky_Glass E3 March 31, 2023, 12:51 p.m. OK GNU C++14 TESTS 95 15 0 2800
199909660 0wuming0 E3 March 31, 2023, 5:51 a.m. OK GNU C++14 TESTS 95 15 0 2800
199809572 DhirishalaLavanya E3 March 30, 2023, 10:34 a.m. OK GNU C++14 TESTS 95 15 0 2800
199798392 caijianhong E3 March 30, 2023, 8:33 a.m. OK GNU C++14 TESTS 95 15 0 2800
199796328 nehakrishna_30612 E3 March 30, 2023, 8:09 a.m. OK GNU C++14 TESTS 95 15 0 2800
199794964 caijianhong E3 March 30, 2023, 7:52 a.m. OK GNU C++14 TESTS 95 15 0 2800
199774773 HakuroKawashiro E3 March 30, 2023, 2:42 a.m. OK GNU C++14 TESTS 95 15 0 2800
199772844 b6e0 E3 March 30, 2023, 2 a.m. OK GNU C++14 TESTS 95 15 0 2800
199772295 b6e0 E3 March 30, 2023, 1:48 a.m. OK GNU C++14 TESTS 95 15 0 2800
199900309 Arktomson E3 March 31, 2023, 2:49 a.m. OK GNU C++17 TESTS 95 15 0 2800
199892337 code_with_baby E3 March 30, 2023, 11:30 p.m. OK GNU C++17 TESTS 95 15 0 2800
199864366 pothangelli123 E3 March 30, 2023, 5:30 p.m. OK GNU C++17 TESTS 95 15 0 2800
199827404 Sung.An E3 March 30, 2023, 1:13 p.m. OK GNU C++17 TESTS 95 15 0 2800
199772809 1459007298 E3 March 30, 2023, 1:59 a.m. OK GNU C++17 TESTS 95 15 0 2800
199770197 zft_4995 E3 March 30, 2023, 1 a.m. OK GNU C++17 TESTS 95 15 0 2800
199948564 Solashiro E3 March 31, 2023, 1:07 p.m. OK GNU C++17 TESTS 95 15 102400 2800
199844786 koooooooooooooooo E3 March 30, 2023, 3:06 p.m. OK GNU C++17 TESTS 95 15 307200 2800
199772667 gabrielwu E3 March 30, 2023, 1:56 a.m. OK GNU C++17 TESTS 95 15 307200 2800
199912494 hanchangseo E3 March 31, 2023, 6:27 a.m. OK GNU C++17 TESTS 95 30 0 2800
199903574 bkifhr10 E3 March 31, 2023, 4:01 a.m. OK GNU C++17 (64) TESTS 95 15 0 2800
199829024 5ab E3 March 30, 2023, 1:26 p.m. OK GNU C++17 (64) TESTS 95 15 0 2800
199818114 John_zyj E3 March 30, 2023, 11:52 a.m. OK GNU C++17 (64) TESTS 95 15 0 2800
199775440 enslaved E3 March 30, 2023, 2:57 a.m. OK GNU C++17 (64) TESTS 95 15 0 2800
199768327 pigpigger E3 March 30, 2023, 12:15 a.m. OK GNU C++17 (64) TESTS 95 15 0 2800
199795394 dognotlike E3 March 30, 2023, 7:58 a.m. OK GNU C++17 (64) TESTS 95 46 1945600 2800
199820125 MarcosK E3 March 30, 2023, 12:10 p.m. OK GNU C++17 (64) TESTS 95 62 716800 2800
199876142 birka0 E3 March 30, 2023, 7:39 p.m. OK GNU C++17 (64) TESTS 95 109 716800 2800
199782519 dognotlike E3 March 30, 2023, 5:11 a.m. OK GNU C++17 (64) TESTS 95 234 35840000 2800
199822552 wygzgyw E3 March 30, 2023, 12:32 p.m. OK GNU C++17 (64) TESTS 95 1591 102400 2800
200042433 36champ E3 March 31, 2023, 8:02 p.m. OK GNU C++20 (64) TESTS 95 15 0 2800
200040561 1RONMAN E3 March 31, 2023, 7:41 p.m. OK GNU C++20 (64) TESTS 95 15 0 2800
199949980 wanghai673 E3 March 31, 2023, 1:20 p.m. OK GNU C++20 (64) TESTS 95 15 0 2800
199945142 Omer223 E3 March 31, 2023, 12:35 p.m. OK GNU C++20 (64) TESTS 95 15 0 2800
199944238 Chime E3 March 31, 2023, 12:26 p.m. OK GNU C++20 (64) TESTS 95 15 0 2800
199944104 wanghai673 E3 March 31, 2023, 12:25 p.m. OK GNU C++20 (64) TESTS 95 15 0 2800
199929810 psc233 E3 March 31, 2023, 10 a.m. OK GNU C++20 (64) TESTS 95 15 0 2800
199904450 sjc061031 E3 March 31, 2023, 4:19 a.m. OK GNU C++20 (64) TESTS 95 15 0 2800
199901803 Reanap E3 March 31, 2023, 3:22 a.m. OK GNU C++20 (64) TESTS 95 15 0 2800
199899495 yyf_0404 E3 March 31, 2023, 2:27 a.m. OK GNU C++20 (64) TESTS 95 15 0 2800
199759669 dzhi E3 March 29, 2023, 9:31 p.m. OK Java 11 TESTS 95 171 0 2800
199949048 sasikirannallapu E3 March 31, 2023, 1:11 p.m. OK Java 11 TESTS 95 187 0 2800
199863278 PranavBadBoy E3 March 30, 2023, 5:21 p.m. OK PyPy 3 TESTS 95 93 0 2800
199917905 bvf E3 March 31, 2023, 7:39 a.m. OK PyPy 3 TESTS 95 93 1740800 2800
199774724 bronze_coder E3 March 30, 2023, 2:40 a.m. OK PyPy 3-64 TESTS 95 62 0 2800
199773983 bronze_coder E3 March 30, 2023, 2:25 a.m. OK PyPy 3-64 TESTS 95 62 1740800 2800
199770338 bronze_coder E3 March 30, 2023, 1:03 a.m. OK PyPy 3-64 TESTS 95 77 2662400 2800
199773951 bronze_coder E3 March 30, 2023, 2:24 a.m. OK PyPy 3-64 TESTS 95 93 1843200 2800

remove filters

Back to search problems