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
( 1848 ) F1 Small Permutation Problem (Easy Version) PROGRAMMING combinatorics dp math

B'In the easy version, the a_i are in the range [0, n] ; in the hard version, the a_i are in the range [-1, n] and the definition of good permutation is slightly different. You can make hacks only if all versions of the problem are solved. You are given an integer n and an array a_1, a_2 ... , a_n of integers in the range [0, n] . A permutation p_1, p_2, ... , p_n of [1, 2, ... , n] is good if, for each i , the following condition is true: Count the good permutations of [1, 2, ... , n] , modulo 998 ,244 ,353 . Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 10^4 ). The description of the test cases follows. The first line of each test case contains a single integer n ( 1 <= q n <= q 2 cdot 10^5 ) -- the length of the array a . The second line of each test case contains n integers a_1, a_2, ldots, a_n ( 0 <= a_i <= n ), which describe the conditions for a good permutation. It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, output a single line containing the number of good permutations, modulo 998 ,244 ,353 . In the first test case, the only good permutation is [1, 2, 3, 4, 5] . In the second test case, there are 4 good permutations: [2, 1, 5, 6, 3, 4] , [2, 1, 5, 6, 4, 3] , [2, 1, 6, 5, 3, 4] , [2, 1, 6, 5, 4, 3] . For example, [2, 1, 5, 6, 3, 4] is good because: In the third test case, there are no good permutations, because there are no permutations with a_6 = 5 values <= q 6 in [p_1, p_2, p_3, p_4, p_5, p_6] . '...

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
238583405 mban259 F1 Dec. 23, 2023, 5:22 p.m. OK C# 10 TESTS 9 78 22937600
238599369 Gassa F1 Dec. 23, 2023, 7:45 p.m. OK D TESTS 9 61 17203200
238575972 Gassa F1 Dec. 23, 2023, 4:54 p.m. OK D TESTS 9 62 13004800
238598449 Atalasion F1 Dec. 23, 2023, 7:33 p.m. OK GNU C++14 TESTS 9 46 1843200
238585654 Jimanbanashi F1 Dec. 23, 2023, 5:29 p.m. OK GNU C++14 TESTS 9 46 1843200
238585884 DreamSpaceDream F1 Dec. 23, 2023, 5:30 p.m. OK GNU C++14 TESTS 9 46 2662400
238623031 lbntxdy F1 Dec. 24, 2023, 5:15 a.m. OK GNU C++14 TESTS 9 46 9113600
238584620 wxhtzdy F1 Dec. 23, 2023, 5:26 p.m. OK GNU C++14 TESTS 9 61 2662400
238576945 zhouchenfeng F1 Dec. 23, 2023, 4:58 p.m. OK GNU C++14 TESTS 9 61 2662400
238581599 yishangtanhuan F1 Dec. 23, 2023, 5:15 p.m. OK GNU C++14 TESTS 9 62 1843200
238581129 Firmino09 F1 Dec. 23, 2023, 5:13 p.m. OK GNU C++14 TESTS 9 62 1843200
238576946 unlock F1 Dec. 23, 2023, 4:58 p.m. OK GNU C++14 TESTS 9 62 1843200
238576455 Hell2Evator F1 Dec. 23, 2023, 4:56 p.m. OK GNU C++14 TESTS 9 62 1843200
238616315 Ste F1 Dec. 24, 2023, 3:11 a.m. OK GNU C++17 TESTS 9 46 1843200
238611204 -is-this-fft- F1 Dec. 24, 2023, 12:43 a.m. OK GNU C++17 TESTS 9 46 1843200
238589884 schtamas F1 Dec. 23, 2023, 6:13 p.m. OK GNU C++17 TESTS 9 46 1843200
238581153 patou F1 Dec. 23, 2023, 5:13 p.m. OK GNU C++17 TESTS 9 46 1843200
238576609 Andyvanh1 F1 Dec. 23, 2023, 4:57 p.m. OK GNU C++17 TESTS 9 46 1843200
238623282 Lskkkno3 F1 Dec. 24, 2023, 5:19 a.m. OK GNU C++17 TESTS 9 46 1945600
238586036 kzyKT F1 Dec. 23, 2023, 5:30 p.m. OK GNU C++17 TESTS 9 46 2662400
238621789 ultizet F1 Dec. 24, 2023, 4:57 a.m. OK GNU C++17 TESTS 9 46 3481600
238584775 FEDIKUS F1 Dec. 23, 2023, 5:26 p.m. OK GNU C++17 TESTS 9 46 5120000
238608807 DemberS06 F1 Dec. 23, 2023, 11:01 p.m. OK GNU C++17 TESTS 9 46 13414400
238581395 Hackenbush F1 Dec. 23, 2023, 5:14 p.m. OK GNU C++17 (64) TESTS 9 15 2048000
238625782 udon1206 F1 Dec. 24, 2023, 5:53 a.m. OK GNU C++17 (64) TESTS 9 31 2048000
238582536 TranGiaHuyWillWinIOI2023 F1 Dec. 23, 2023, 5:18 p.m. OK GNU C++17 (64) TESTS 9 31 2048000
238581804 duanyuu F1 Dec. 23, 2023, 5:16 p.m. OK GNU C++17 (64) TESTS 9 31 2048000
238619839 Mag1sk F1 Dec. 24, 2023, 4:22 a.m. OK GNU C++17 (64) TESTS 9 31 2867200
238613884 RedreamMer F1 Dec. 24, 2023, 2:14 a.m. OK GNU C++17 (64) TESTS 9 31 3072000
238582556 Melacau F1 Dec. 23, 2023, 5:19 p.m. OK GNU C++17 (64) TESTS 9 31 3686400
238579918 qkm66666 F1 Dec. 23, 2023, 5:08 p.m. OK GNU C++17 (64) TESTS 9 31 3686400
238618755 LXH-cat F1 Dec. 24, 2023, 4:02 a.m. OK GNU C++17 (64) TESTS 9 31 4403200
238585551 yuvrajKharayat F1 Dec. 23, 2023, 5:29 p.m. OK GNU C++17 (64) TESTS 9 31 7680000
238587160 islingr F1 Dec. 23, 2023, 5:34 p.m. OK GNU C++20 (64) TESTS 9 15 3686400
238581773 ForbiddenCider F1 Dec. 23, 2023, 5:15 p.m. OK GNU C++20 (64) TESTS 9 30 19251200
238616773 nguyenquocthinhhung F1 Dec. 24, 2023, 3:22 a.m. OK GNU C++20 (64) TESTS 9 31 1228800
238611693 xnor F1 Dec. 24, 2023, 1:04 a.m. OK GNU C++20 (64) TESTS 9 31 1228800
238606494 chappy1 F1 Dec. 23, 2023, 9:51 p.m. OK GNU C++20 (64) TESTS 9 31 1228800
238583969 YahiaSherif F1 Dec. 23, 2023, 5:24 p.m. OK GNU C++20 (64) TESTS 9 31 1331200
238620301 Akash. F1 Dec. 24, 2023, 4:31 a.m. OK GNU C++20 (64) TESTS 9 31 2048000
238618333 yuanruiqi F1 Dec. 24, 2023, 3:55 a.m. OK GNU C++20 (64) TESTS 9 31 2048000
238610256 Alfeh F1 Dec. 24, 2023, 12:01 a.m. OK GNU C++20 (64) TESTS 9 31 2048000
238609210 higz F1 Dec. 23, 2023, 11:17 p.m. OK GNU C++20 (64) TESTS 9 31 2048000
238583840 DarLam F1 Dec. 23, 2023, 5:23 p.m. OK Java 11 TESTS 9 280 24985600
238581240 knightL F1 Dec. 23, 2023, 5:13 p.m. OK Java 17 TESTS 9 249 40038400
238591457 RMA-NB F1 Dec. 23, 2023, 6:22 p.m. OK Java 8 TESTS 9 139 26624000
238606090 TemporalBloom F1 Dec. 23, 2023, 9:42 p.m. OK MS C++ 2017 TESTS 9 171 3481600
238590573 valyanarezka F1 Dec. 23, 2023, 6:16 p.m. OK MS C++ 2017 TESTS 9 202 2764800
238594194 lisashi F1 Dec. 23, 2023, 6:43 p.m. OK PyPy 3 TESTS 9 280 35020800
238582715 Wind5654 F1 Dec. 23, 2023, 5:19 p.m. OK PyPy 3 TESTS 9 561 35430400
238594990 ManojkumarPatanik F1 Dec. 23, 2023, 6:51 p.m. OK PyPy 3-64 TESTS 9 93 47513600
238591402 PFT F1 Dec. 23, 2023, 6:21 p.m. OK PyPy 3-64 TESTS 9 93 47513600
238576937 codicon F1 Dec. 23, 2023, 4:57 p.m. OK PyPy 3-64 TESTS 9 109 49356800
238607495 Jayg000e F1 Dec. 23, 2023, 10:17 p.m. OK PyPy 3-64 TESTS 9 124 49152000
238578620 petamingks F1 Dec. 23, 2023, 5:03 p.m. OK PyPy 3-64 TESTS 9 124 54579200
238577189 toam F1 Dec. 23, 2023, 4:58 p.m. OK PyPy 3-64 TESTS 9 155 56524800
238586688 plevande F1 Dec. 23, 2023, 5:32 p.m. OK PyPy 3-64 TESTS 9 171 46182400
238597278 Alex239 F1 Dec. 23, 2023, 7:17 p.m. OK PyPy 3-64 TESTS 9 171 55091200
238584917 Z_actuary F1 Dec. 23, 2023, 5:27 p.m. OK PyPy 3-64 TESTS 9 233 52224000
238620353 minhnguyen13082003 F1 Dec. 24, 2023, 4:32 a.m. OK PyPy 3-64 TESTS 9 280 51916800
238592315 PugachAG F1 Dec. 23, 2023, 6:27 p.m. OK Rust 2021 TESTS 9 31 2764800
238609445 kost F1 Dec. 23, 2023, 11:27 p.m. OK Rust 2021 TESTS 9 31 15974400
238596136 haihamabossu F1 Dec. 23, 2023, 7:03 p.m. OK Rust 2021 TESTS 9 31 15974400

remove filters

Back to search problems