2021-2022 ICPC, NERC, Northern Eurasia Onsite (Unrated, Online Mirror, ICPC Rules, Teams Preferred)

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
1666 2021-2022 ICPC, NERC, Northern Eurasia Onsite (Unrated, Online Mirror, ICPC Rules, Teams Preferred) FINISHED False 18000 81986099 April 13, 2022, 8:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1183 ) F Fancy Stack PROGRAMMING combinatorics dp

B"Little Fiona has a collection of n blocks of various sizes a_1, a_2, ldots, a_n , where n is even. Some of the blocks can be equal in size. She would like to put all these blocks one onto another to form a fancy stack. Let b_1, b_2, ldots, b_n be the sizes of blocks in the stack from top to bottom. Since Fiona is using all her blocks, b_1, b_2, ldots, b_n must be a permutation of a_1, a_2, ldots, a_n . Fiona thinks the stack is fancy if both of the following conditions are satisfied: Two stacks are considered different if their corresponding sequences b_1, b_2, ldots, b_n differ in at least one position. Fiona wants to know how many different fancy stacks she can build with all of her blocks. Since large numbers scare Fiona, find this number modulo 998 ,244 ,353 . Each input contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 2500 ). Description of the test cases follows. The first line of each test case contains a single integer n -- the number of blocks at Fiona's disposal ( 2 <= n <= 5000 ; n is even). The second line contains n integers a_1, a_2, ldots, a_n -- the sizes of the blocks in non-decreasing order ( 1 <= a_1 <= a_2 <= ... b <= a_n <= n ). It is guaranteed that the sum of n over all test cases does not exceed 5000 . For each test case, print the number of ways to build a fancy stack, modulo 998 ,244 ,353 . "...

Tutorials

Tutorial (PDF)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
153543082 CHNJZ yekehe psc233 F April 13, 2022, 9:43 a.m. OK GNU C++14 TESTS 50 78 102400
153576871 Democy F April 13, 2022, 4:10 p.m. OK GNU C++14 TESTS 50 109 102400
153543906 LZDQ heaksicn andychen2012 F April 13, 2022, 9:51 a.m. OK GNU C++14 TESTS 50 109 204800
153549988 iterater ZGS_WZY Wall_breaker F April 13, 2022, 10:57 a.m. OK GNU C++14 TESTS 50 124 201318400
153535147 djq_cpp jiangly MiracleFaFa F April 13, 2022, 8:33 a.m. OK GNU C++14 TESTS 50 140 36249600
153547322 Milesian liouzhou_101 lucifer1004 F April 13, 2022, 10:27 a.m. OK GNU C++14 TESTS 50 140 102297600
153540971 Gom gs18115 Retro3014 F April 13, 2022, 9:23 a.m. OK GNU C++14 TESTS 50 155 200806400
153560947 Jimanbanashi F April 13, 2022, 12:52 p.m. OK GNU C++14 TESTS 50 155 201216000
153547202 light0love F April 13, 2022, 10:26 a.m. OK GNU C++14 TESTS 50 156 204800
153553192 hungry1234 F April 13, 2022, 11:30 a.m. OK GNU C++14 TESTS 50 156 307200
153556741 thisisis F April 13, 2022, 12:08 p.m. OK GNU C++17 TESTS 50 108 100864000
153535690 MetalPower F April 13, 2022, 8:38 a.m. OK GNU C++17 TESTS 50 186 102297600
153548445 _Viole_ F April 13, 2022, 10:40 a.m. OK GNU C++17 TESTS 50 187 204800
153567571 tarjen F April 13, 2022, 1:52 p.m. OK GNU C++17 TESTS 50 187 100864000
153547692 Acranker Vexoben F April 13, 2022, 10:32 a.m. OK GNU C++17 TESTS 50 187 200806400
153543239 psz_orz psz2007 e3c8f1a924 F April 13, 2022, 9:45 a.m. OK GNU C++17 TESTS 50 202 205312000
153536402 fanache99 lumibons F April 13, 2022, 8:44 a.m. OK GNU C++17 TESTS 50 217 100352000
153553509 Raiden steinum F April 13, 2022, 11:34 a.m. OK GNU C++17 TESTS 50 233 201523200
153582107 flying_doraemon F April 13, 2022, 5:36 p.m. OK GNU C++17 TESTS 50 234 52940800
153597215 newhar F April 13, 2022, 11:59 p.m. OK GNU C++17 TESTS 50 234 201318400
153568174 tsukiko_tsutsukakushi F April 13, 2022, 2 p.m. OK GNU C++17 (64) TESTS 50 31 204800
153550845 kencho tsukiko_tsutsukakushi _su1sen F April 13, 2022, 11:05 a.m. OK GNU C++17 (64) TESTS 50 31 204800
153540219 est_stella F April 13, 2022, 9:16 a.m. OK GNU C++17 (64) TESTS 50 62 201318400
153553597 Durant_Lee F April 13, 2022, 11:35 a.m. OK GNU C++17 (64) TESTS 50 78 307200
153539213 Maripium zhangguangxuan99 nvmdava F April 13, 2022, 9:07 a.m. OK GNU C++17 (64) TESTS 50 78 307200
153536159 SSRS_ nuip noimi F April 13, 2022, 8:42 a.m. OK GNU C++17 (64) TESTS 50 93 512000
153548437 KKT_89 F April 13, 2022, 10:40 a.m. OK GNU C++17 (64) TESTS 50 93 16998400
153544183 tyler178 applese Timsei F April 13, 2022, 9:54 a.m. OK GNU C++17 (64) TESTS 50 93 100454400
153541254 qazswedx2 F April 13, 2022, 9:26 a.m. OK GNU C++17 (64) TESTS 50 93 101990400
153549714 RiverHamster q-w-q-w-q Suiseiseki F April 13, 2022, 10:54 a.m. OK GNU C++17 (64) TESTS 50 93 150630400
153542821 Saman. kianaRZV S2speed F April 13, 2022, 9:41 a.m. OK GNU C++20 (64) TESTS 50 31 204800
153546140 neko_nyaaaaaaaaaaaaaaaaa ngfam chemthan F April 13, 2022, 10:15 a.m. OK GNU C++20 (64) TESTS 50 31 512000
153541102 A-SOUL_Diana A-SOUL_Carol A-SOUL_Bella F April 13, 2022, 9:24 a.m. OK GNU C++20 (64) TESTS 50 46 204800
153557059 nebula MohammadAghil F April 13, 2022, 12:11 p.m. OK GNU C++20 (64) TESTS 50 46 409600
153562108 glancing_back F April 13, 2022, 1:03 p.m. OK GNU C++20 (64) TESTS 50 46 16076800
153548726 IceKnight1093 F April 13, 2022, 10:43 a.m. OK GNU C++20 (64) TESTS 50 62 102400
153540125 nickcotforce Normie28 generic_placeholder_name F April 13, 2022, 9:15 a.m. OK GNU C++20 (64) TESTS 50 77 100454400
153556515 Zhukov_Dmitry F April 13, 2022, 12:06 p.m. OK GNU C++20 (64) TESTS 50 78 101273600
153536786 wcdr feecIe6418 gyh20 F April 13, 2022, 8:47 a.m. OK GNU C++20 (64) TESTS 50 92 100454400
153596910 luogu_bot5 F April 13, 2022, 11:44 p.m. OK GNU C++20 (64) TESTS 50 93 100556800
153536423 arvindf232 kevinxiehk nicholask F April 13, 2022, 8:44 a.m. OK Kotlin 1.5 TESTS 50 514 146329600
153578175 Spheniscine F April 13, 2022, 4:32 p.m. OK Rust 2021 TESTS 50 62 307200
153574996 Spheniscine F April 13, 2022, 3:41 p.m. OK Rust 2021 TESTS 50 62 307200
153577955 Spheniscine F April 13, 2022, 4:28 p.m. OK Rust 2021 TESTS 50 93 307200
153546737 sansen F April 13, 2022, 10:21 a.m. OK Rust 2021 TESTS 50 390 307200

remove filters

Back to search problems