Codeforces Round 758 (Div.1 + 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
1608 Codeforces Round 758 (Div.1 + Div. 2) FINISHED False 7200 92606099 Dec. 11, 2021, 10:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 609 ) F MEX counting PROGRAMMING combinatorics dp

B"For an array c of nonnegative integers, MEX(c) denotes the smallest nonnegative integer that doesn't appear in it. For example, MEX([0, 1, 3]) = 2 , MEX([42]) = 0 . You are given integers n, k , and an array [b_1, b_2, ldots, b_n] . Find the number of arrays [a_1, a_2, ldots, a_n] , for which the following conditions hold: 0 <= a_i <= n for each i for each i from 1 to n . |MEX([a_1, a_2, ldots, a_i]) - b_i| <= k for each i from 1 to n . As this number can be very big, output it modulo 998 ,244 ,353 . The first line of the input contains two integers n, k ( 1 <= n <= 2000 , 0 <= k <= 50 ). The second line of the input contains n integers b_1, b_2, ldots, b_n ( -k <= b_i <= n+k ) -- elements of the array b . Output a single integer -- the number of arrays which satisfy the conditions from the statement, modulo 998 ,244 ,353 . "...

Tutorials

Editorial of Codeforces Round #758 (Div.1 + Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
138813192 yao11617 F Dec. 11, 2021, 8:36 p.m. OK GNU C++14 TESTS 29 2308 17817600
138795697 yao11617 F Dec. 11, 2021, 4:17 p.m. OK GNU C++14 TESTS 29 2371 17817600
138772062 ugly2333 F Dec. 11, 2021, 12:25 p.m. OK GNU C++14 TESTS 29 3415 83148800
138824978 wygzgyw F Dec. 12, 2021, 3:43 a.m. OK GNU C++17 (64) TESTS 29 1544 64819200
138791262 MongoliaTop F Dec. 11, 2021, 3:26 p.m. OK GNU C++17 (64) TESTS 29 2090 1638400
138791656 MongoliaTop F Dec. 11, 2021, 3:31 p.m. OK GNU C++17 (64) TESTS 29 2168 1638400
138766868 RimuruTempest F Dec. 11, 2021, 11:57 a.m. OK GNU C++17 (64) TESTS 29 2433 18739200
138768315 MongoliaTop F Dec. 11, 2021, 12:01 p.m. OK GNU C++17 (64) TESTS 29 2807 1638400
138776142 errorgorn F Dec. 11, 2021, 12:57 p.m. OK GNU C++17 (64) TESTS 29 3181 112742400
138802666 idontwannawin F Dec. 11, 2021, 5:47 p.m. OK GNU C++17 (64) TESTS 29 3510 4812800
138771178 ksun48 F Dec. 11, 2021, 12:20 p.m. OK GNU C++17 (64) TESTS 29 3806 18227200
138771063 Geothermal F Dec. 11, 2021, 12:20 p.m. OK GNU C++17 (64) TESTS 29 3915 4812800
138793110 NPBot F Dec. 11, 2021, 3:48 p.m. OK GNU C++20 (64) TESTS 29 2028 1638400
138827480 chctxdy68 F Dec. 12, 2021, 4:53 a.m. OK GNU C++20 (64) TESTS 29 2152 135475200
138801481 BlueDiamond F Dec. 11, 2021, 5:31 p.m. OK GNU C++20 (64) TESTS 29 3182 3686400
138801461 NutellaChocolate F Dec. 11, 2021, 5:31 p.m. OK GNU C++20 (64) TESTS 29 3182 3686400
138778244 Amoo_Safar F Dec. 11, 2021, 1:18 p.m. OK GNU C++20 (64) TESTS 29 3977 2560000
138780032 Amoo_Safar F Dec. 11, 2021, 1:34 p.m. OK GNU C++20 (64) TESTS 29 3978 2560000

remove filters

Back to search problems