Codeforces Round 752 (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
1603 Codeforces Round 752 (Div. 1) FINISHED False 7200 96218699 Oct. 30, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 441 ) E A Perfect Problem PROGRAMMING combinatorics dp

B'A sequence of integers b_1, b_2, ldots, b_m is called good if max(b_1, b_2, ldots, b_m) cdot min(b_1, b_2, ldots, b_m) ge b_1 + b_2 + ldots + b_m . A sequence of integers a_1, a_2, ldots, a_n is called perfect if every non-empty subsequence of a is good. YouKn0wWho has two integers n and M , M is prime. Help him find the number, modulo M , of perfect sequences a_1, a_2, ldots, a_n such that 1 <= a_i <= n + 1 for each integer i from 1 to n . A sequence d is a subsequence of a sequence c if d can be obtained from c by deletion of several (possibly, zero or all) elements. The first and only line of the input contains two space-separated integers n and M ( 1 <= n <= 200 ; 10^8 <= M <= 10^9 ). It is guaranteed that M is prime. Print a single integer -- the number of perfect sequences modulo M . In the first test case, the perfect sequences are [2, 2] , [2, 3] , [3, 2] and [3, 3] . In the second test case, some of the perfect sequences are [3, 4, 3, 5] , [4, 5, 4, 4] , [4, 5, 5, 5] etc. One example of a sequence which is not perfect is [2, 3, 3, 4] , because, for example, the subsequence [2, 3, 4] is not an good as 2 cdot 4 < 2 + 3 + 4 . '...

Tutorials

Editorial of Codeforces Round #752

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
133682651 2005lz E Oct. 30, 2021, 4:31 p.m. OK GNU C++14 TESTS 52 748 34099200
133718444 abcde1202 E Oct. 31, 2021, 4:22 a.m. OK GNU C++17 TESTS 52 234 36761600
133670921 DmitryGrigorev E Oct. 30, 2021, 4:04 p.m. OK GNU C++17 TESTS 52 265 36761600
133678832 Moririn2528 E Oct. 30, 2021, 4:23 p.m. OK GNU C++17 TESTS 52 1231 11161600
133698597 Petr E Oct. 30, 2021, 7:21 p.m. OK GNU C++17 (64) TESTS 52 62 2048000
133720140 Alan233 E Oct. 31, 2021, 4:54 a.m. OK GNU C++17 (64) TESTS 52 62 16384000
133670917 Petr E Oct. 30, 2021, 4:04 p.m. OK GNU C++17 (64) TESTS 52 93 2048000
133691448 Benq E Oct. 30, 2021, 5:57 p.m. OK GNU C++17 (64) TESTS 52 218 1740800
133674718 ecnerwala E Oct. 30, 2021, 4:13 p.m. OK GNU C++17 (64) TESTS 52 530 1433600
133693808 heno239 E Oct. 30, 2021, 6:22 p.m. OK GNU C++17 (64) TESTS 52 670 18739200
133682168 LMOliver E Oct. 30, 2021, 4:31 p.m. OK GNU C++17 (64) TESTS 52 795 129638400
133689968 q-w-q-w-q E Oct. 30, 2021, 5:44 p.m. OK GNU C++17 (64) TESTS 52 1122 35737600
133654251 tourist E Oct. 30, 2021, 3:27 p.m. OK GNU C++17 (64) TESTS 52 1450 37171200
133677480 oleh1421 E Oct. 30, 2021, 4:20 p.m. OK GNU C++17 (64) TESTS 52 1637 38297600
133688515 fedoseev.timofey E Oct. 30, 2021, 5:33 p.m. OK GNU C++20 (64) TESTS 52 1341 36044800

remove filters

Back to search problems