Pinely Round 3 (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
1909 Pinely Round 3 (Div. 1 + Div. 2) FINISHED False 10800 28481099 Dec. 23, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 119 ) I Short Permutation Problem PROGRAMMING combinatorics dp fft math

B'You are given an integer n . For each (m, k) such that 3 <= q m <= q n+1 and 0 <= q k <= q n-1 , count the permutations of [1, 2, ..., n] such that p_i + p_{i+1} geq m for exactly k indices i , modulo 998 ,244 ,353 . The input consists of a single line, which contains two integers n , x ( 2 <= q n <= q 4000 , 1 <= q x < 1 ,000 ,000 ,007 ). Let a_{m,k} be the answer for the pair (m, k) , modulo 998 ,244 ,353 . Let large S = sum_{m=3}^{n+1} sum_{k=0}^{n-1} a_{m,k}x^{mn+k} phantom{0}. Output a single line with an integer: S modulo 1 ,000 ,000 ,007 . Note that using two different modulos is intentional. We want you to calculate all the a_{m,k} modulo 998 ,244 ,353 , then treat them like integers in the range [0, 998 ,244 ,352] , and hash them modulo 1 ,000 ,000 ,007 . In the first test case, the answers for all (m, k) are shown in the following table: Therefore, the value to print is 2^9 cdot 0 + 2^{10} cdot 0 + 2^{11} cdot 6 + 2^{12} cdot 0 + 2^{13} cdot 4 + 2^{14} cdot 2 equiv 77 ,824 phantom{0} ( text{mod} phantom{0} 1 ,000 ,000 ,007) . In the second test case, the answers for all (m, k) are shown in the following table: In the third test case, the answers for all (m, k) are shown in the following table: '...

Tutorials

Editorial of Pinely Round 3 (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
238590508 rainboy I Dec. 23, 2023, 6:16 p.m. OK GNU C++17 (64) TESTS 14 2869 1433600
238601334 Benq I Dec. 23, 2023, 8:14 p.m. OK GNU C++17 (64) TESTS 14 3119 112128000
238615726 Sparkle_Twilight I Dec. 24, 2023, 2:58 a.m. OK GNU C++17 (64) TESTS 14 4134 3993600
238612798 cibuK I Dec. 24, 2023, 1:43 a.m. OK GNU C++17 (64) TESTS 14 4134 3993600
238594787 maroonrk I Dec. 23, 2023, 6:49 p.m. OK GNU C++20 (64) TESTS 14 1184 172646400
238592766 Darxide I Dec. 23, 2023, 6:31 p.m. OK GNU C++20 (64) TESTS 14 2027 228454400
238606211 chappy1 I Dec. 23, 2023, 9:44 p.m. OK GNU C++20 (64) TESTS 14 2823 1433600
238604578 Slamaa I Dec. 23, 2023, 9:09 p.m. OK GNU C++20 (64) TESTS 14 2823 1433600
238597326 ManojkumarPatanik I Dec. 23, 2023, 7:17 p.m. OK GNU C++20 (64) TESTS 14 2823 1433600
238616743 nguyenquocthinhhung I Dec. 24, 2023, 3:21 a.m. OK GNU C++20 (64) TESTS 14 2839 1433600
238605611 ttamx I Dec. 23, 2023, 9:31 p.m. OK GNU C++20 (64) TESTS 14 5475 258867200

remove filters

Back to search problems