Codeforces Round 942 (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
1967 Codeforces Round 942 (Div. 1) FINISHED False 9000 30295487 April 30, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 249 ) E1 Again Counting Arrays (Easy Version) PROGRAMMING combinatorics dp fft math 3100

B'This is the easy version of the problem. The differences between the two versions are the constraints on n, m, b_0 and the time limit. You can make hacks only if both versions are solved. Little R has counted many sets before, and now she decides to count arrays. Little R thinks an array b_0, ldots, b_n consisting of non-negative integers is continuous if and only if, for each i such that 1 <= q i <= q n , lvert b_i - b_{i-1} rvert = 1 is satisfied. She likes continuity, so she only wants to generate continuous arrays. If Little R is given b_0 and a_1, ldots, a_n , she will try to generate a non-negative continuous array b , which has no similarity with a . More formally, for all 1 <= q i <= q n , a_i neq b_i holds. However, Little R does not have any array a . Instead, she gives you n , m and b_0 . She wants to count the different integer arrays a_1, ldots, a_n satisfying: Note that b_i geq 0 , but the b_i can be arbitrarily large. Since the actual answer may be enormous, please just tell her the answer modulo 998 ,244 ,353 . Each test contains multiple test cases. The first line contains the number of test cases t (1 <= q t <= q 10^4) . The description of the test cases follows. The first and only line of each test case contains three integers n , m , and b_0 ( 1 <= q n <= q 2 cdot 10^5 , 1 <= q m <= q 2 cdot 10^5 , 0 <= q b_0 <= q 2 cdot 10^5 ) -- the length of the array a_1, ldots, a_n , the maximum possible element in a_1, ldots, a_n , and the initial element of the array b_0, ldots, b_n . It is guaranteed that the sum of n over all test cases does not exceeds 2 cdot 10^5 . For each test case, output a single line containing an integer: the number of different arrays a_1, ldots, a_n satisfying the conditions, modulo 998 ,244 ,353 . In the first test case, for exa'...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
259722116 by_chance E1 May 6, 2024, 8:36 a.m. OK C++14 (GCC 6-32) TESTS 21 124 24064000 3100
259071999 Chenly E1 May 2, 2024, 2:23 a.m. OK C++14 (GCC 6-32) TESTS 21 139 32153600 3100
258991991 schrodingerstom E1 May 1, 2024, 9:51 a.m. OK C++14 (GCC 6-32) TESTS 21 609 9625600 3100
260973354 susmitha_seeta E1 May 14, 2024, 6:50 p.m. OK C++14 (GCC 6-32) TESTS 21 733 72192000 3100
258925037 Flamire E1 April 30, 2024, 5:40 p.m. OK C++14 (GCC 6-32) TESTS 21 765 16076800 3100
258915462 by_chance E1 April 30, 2024, 4:39 p.m. OK C++14 (GCC 6-32) TESTS 21 890 56115200 3100
262338195 233L E1 May 24, 2024, 5:40 a.m. OK C++14 (GCC 6-32) TESTS 21 921 363929600 3100
258917530 crazy_sea E1 April 30, 2024, 4:47 p.m. OK C++14 (GCC 6-32) TESTS 21 1046 360755200 3100
263151109 ERoslon E1 May 29, 2024, 1:50 p.m. OK C++14 (GCC 6-32) TESTS 21 1061 8089600 3100
263151236 ERoslon E1 May 29, 2024, 1:51 p.m. OK C++14 (GCC 6-32) TESTS 21 1077 8089600 3100
258922310 Elegia E1 April 30, 2024, 5:04 p.m. OK C++17 (GCC 7-32) TESTS 21 109 6451200 3100
259634254 noideayt10 E1 May 5, 2024, 12:49 p.m. OK C++17 (GCC 7-32) TESTS 21 140 5529600 3100
261221840 fengqiyuka E1 May 16, 2024, 3:52 p.m. OK C++17 (GCC 7-32) TESTS 21 171 40140800 3100
259832238 gbunuxi E1 May 7, 2024, 6:09 a.m. OK C++17 (GCC 7-32) TESTS 21 328 21913600 3100
259314992 nishkarsh E1 May 3, 2024, 6:01 a.m. OK C++17 (GCC 7-32) TESTS 21 342 80179200 3100
259854291 2210080011_yakub E1 May 7, 2024, 9:36 a.m. OK C++17 (GCC 7-32) TESTS 21 671 410419200 3100
259778164 spamers E1 May 6, 2024, 4:23 p.m. OK C++17 (GCC 7-32) TESTS 21 718 3276800 3100
259250263 xioxio E1 May 2, 2024, 5:14 p.m. OK C++17 (GCC 7-32) TESTS 21 718 3276800 3100
259777728 spamers E1 May 6, 2024, 4:18 p.m. OK C++17 (GCC 7-32) TESTS 21 749 3276800 3100
259960706 2210080040 E1 May 8, 2024, 7 a.m. OK C++17 (GCC 7-32) TESTS 21 749 410521600 3100
262103770 yuanhaowei E1 May 22, 2024, 7:12 a.m. OK C++20 (GCC 13-64) TESTS 21 62 6451200 3100
259001527 LNian E1 May 1, 2024, 11:37 a.m. OK C++20 (GCC 13-64) TESTS 21 62 9728000 3100
262321775 fsfdgdg E1 May 24, 2024, 1:12 a.m. OK C++20 (GCC 13-64) TESTS 21 62 32051200 3100
258921659 jiangly E1 April 30, 2024, 5:03 p.m. OK C++20 (GCC 13-64) TESTS 21 77 9728000 3100
259020865 DybalaFFF765657 E1 May 1, 2024, 2:47 p.m. OK C++20 (GCC 13-64) TESTS 21 77 9830400 3100
259360061 N_z__ E1 May 3, 2024, 1:03 p.m. OK C++20 (GCC 13-64) TESTS 21 77 16179200 3100
262830973 Yuvraj_2004 E1 May 27, 2024, 5:40 a.m. OK C++20 (GCC 13-64) TESTS 21 77 24064000 3100
260677626 Leccelerator E1 May 12, 2024, 2:28 p.m. OK C++20 (GCC 13-64) TESTS 21 77 24064000 3100
263317834 Kaif_9848 E1 May 30, 2024, 3:23 p.m. OK C++20 (GCC 13-64) TESTS 21 77 32051200 3100
259359990 N_z__ E1 May 3, 2024, 1:02 p.m. OK C++20 (GCC 13-64) TESTS 21 92 16179200 3100
258936543 rainboy E1 April 30, 2024, 7:49 p.m. OK GNU C11 TESTS 21 217 64307200 3100
259999816 timiss E1 May 8, 2024, 12:41 p.m. OK GNU C11 TESTS 21 249 64204800 3100

remove filters

Back to search problems