Pinely Round 1 (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
1761 Pinely Round 1 (Div. 1 + Div. 2) FINISHED False 9000 68225063 Nov. 20, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 13674 ) B Elimination of a Ring PROGRAMMING constructive algorithms greedy implementation

B"Define a cyclic sequence of size n as an array s of length n , in which s_n is adjacent to s_1 . Muxii has a ring represented by a cyclic sequence a of size n . However, the ring itself hates equal adjacent elements. So if two adjacent elements in the sequence are equal at any time, one of them will be erased immediately. The sequence doesn't contain equal adjacent elements initially. Muxii can perform the following operation until the sequence becomes empty: For example, if ring is [1, 2, 4, 2, 3, 2] , and Muxii erases element 4 , then ring would erase one of the elements equal to 2 , and the ring will become [1, 2, 3, 2] . Muxii wants to find the maximum number of operations he could perform. Note that in a ring of size 1 , its only element isn't considered adjacent to itself (so it's not immediately erased). Each test contains multiple test cases. The first line contains a single integer t ( 1 <= q t <= q 100 ) -- the number of test cases. The description of test cases follows. The first line of each test case contains a single integer n ( 1 <= q n <= q 100 ) -- the size of the cyclic sequence. The second line of each test case contains n integers a_1,a_2, ldots,a_n ( 1 <= q a_i <= q n ) -- the sequence itself. It's guaranteed that a_i ne a_{i+1} for 1 <= q i<n . It's guaranteed that a_n ne a_1 when n>1 . For each test case, output a single integer -- the maximum number of operations Muxii can perform. In the first test case, you can erase the second element first, then erase the remaining elements one by one in any order. In total, you can perform the operation 4 times. Note that if you erase the first element first, then the sequence will be turned into [2,3,2] and then immediately become [2,3] . In the second test case, you can erase the first element first, then the sequence becomes [2,1] . Then you can era"...

Tutorials

Pinely Round 1 (Div. 1 + Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
181788851 singhkrishnajsr143 B Nov. 20, 2022, 4:08 p.m. OK C# 10 TESTS 12 46 1024000
181786694 doublethinker B Nov. 20, 2022, 3:59 p.m. OK C# 10 TESTS 12 124 1433600
181811656 Prov1dec B Nov. 20, 2022, 6:43 p.m. OK C# 8 TESTS 12 77 716800
181812615 ansergeyg B Nov. 20, 2022, 6:53 p.m. OK C# 8 TESTS 12 93 614400
181837235 GianKuhz B Nov. 21, 2022, 3:32 a.m. OK Clang++17 Diagnostics TESTS 12 31 2048000
181786278 cyrus_msk B Nov. 20, 2022, 3:58 p.m. OK D TESTS 12 15 0
181807008 ssvb B Nov. 20, 2022, 6:01 p.m. OK D TESTS 12 15 0
181812027 nestor_makhno B Nov. 20, 2022, 6:47 p.m. OK GNU C11 TESTS 12 15 0
181833972 Miraemon B Nov. 21, 2022, 2:16 a.m. OK GNU C11 TESTS 12 15 0
181838499 Interested B Nov. 21, 2022, 4 a.m. OK GNU C11 TESTS 12 15 0
181794769 SAFIN07 B Nov. 20, 2022, 4:33 p.m. OK GNU C11 TESTS 12 30 0
181817003 Mushfiqur_ B Nov. 20, 2022, 7:45 p.m. OK GNU C11 TESTS 12 31 0
181789940 chicken_204 B Nov. 20, 2022, 4:12 p.m. OK GNU C++14 TESTS 12 0 0
181807219 Concrete_Green B Nov. 20, 2022, 6:03 p.m. OK GNU C++14 TESTS 12 0 102400
181818808 joshincr B Nov. 20, 2022, 8:08 p.m. OK GNU C++14 TESTS 12 0 204800
181837623 jcybtd B Nov. 21, 2022, 3:41 a.m. OK GNU C++14 TESTS 12 15 0
181837149 zsj6315 B Nov. 21, 2022, 3:30 a.m. OK GNU C++14 TESTS 12 15 0
181842486 abhijeetjadhav B Nov. 21, 2022, 5:27 a.m. OK GNU C++14 TESTS 13 15 0
181841533 zhangas B Nov. 21, 2022, 5:07 a.m. OK GNU C++14 TESTS 13 15 0
181840176 SuperJ6 B Nov. 21, 2022, 4:39 a.m. OK GNU C++14 TESTS 12 15 0
181837955 HoangHao B Nov. 21, 2022, 3:48 a.m. OK GNU C++14 TESTS 12 15 0
181842699 HitenIsrani B Nov. 21, 2022, 5:31 a.m. OK GNU C++14 TESTS 13 15 0
181814713 Nishant777 B Nov. 20, 2022, 7:17 p.m. OK GNU C++17 TESTS 12 0 0
181808414 15o3 B Nov. 20, 2022, 6:12 p.m. OK GNU C++17 TESTS 12 0 0
181832439 Dannyplusplus B Nov. 21, 2022, 1:34 a.m. OK GNU C++17 TESTS 12 0 0
181841430 ayush_g3 B Nov. 21, 2022, 5:04 a.m. OK GNU C++17 TESTS 13 0 0
181811139 Reiner-Braun B Nov. 20, 2022, 6:38 p.m. OK GNU C++17 TESTS 12 0 0
181824875 The_CodY B Nov. 20, 2022, 9:54 p.m. OK GNU C++17 TESTS 12 0 0
181830336 wcwu B Nov. 21, 2022, 12:33 a.m. OK GNU C++17 TESTS 12 0 0
181843281 Hamine B Nov. 21, 2022, 5:43 a.m. OK GNU C++17 TESTS 13 0 102400
181841876 easy_fiol B Nov. 21, 2022, 5:14 a.m. OK GNU C++17 TESTS 13 0 102400
181835976 shahriar42 B Nov. 21, 2022, 3:01 a.m. OK GNU C++17 TESTS 12 0 102400
181820564 shaanjijoe2 B Nov. 20, 2022, 8:33 p.m. OK GNU C++17 (64) TESTS 12 0 0
181843983 ChenKaifeng B Nov. 21, 2022, 5:55 a.m. OK GNU C++17 (64) TESTS 13 0 0
181842989 fahadkabir123 B Nov. 21, 2022, 5:37 a.m. OK GNU C++17 (64) TESTS 13 0 0
181839802 Caraxes B Nov. 21, 2022, 4:31 a.m. OK GNU C++17 (64) TESTS 12 0 0
181837179 istiaqfuad B Nov. 21, 2022, 3:30 a.m. OK GNU C++17 (64) TESTS 12 0 0
181833508 BetoSCL B Nov. 21, 2022, 2:03 a.m. OK GNU C++17 (64) TESTS 12 0 0
181832870 Jame___boy B Nov. 21, 2022, 1:47 a.m. OK GNU C++17 (64) TESTS 12 0 0
181831275 shuaideyipi B Nov. 21, 2022, 1:01 a.m. OK GNU C++17 (64) TESTS 12 0 0
181829720 edchen B Nov. 21, 2022, 12:14 a.m. OK GNU C++17 (64) TESTS 12 0 0
181829417 ......77 B Nov. 21, 2022, 12:05 a.m. OK GNU C++17 (64) TESTS 12 0 0
181841097 Yash_2403 B Nov. 21, 2022, 4:58 a.m. OK GNU C++20 (64) TESTS 13 0 0
181839524 dhruv35 B Nov. 21, 2022, 4:25 a.m. OK GNU C++20 (64) TESTS 12 0 0
181838880 DimmyT B Nov. 21, 2022, 4:09 a.m. OK GNU C++20 (64) TESTS 12 0 0
181838537 Haven_ B Nov. 21, 2022, 4:01 a.m. OK GNU C++20 (64) TESTS 12 0 0
181838399 puneetvishnoi B Nov. 21, 2022, 3:58 a.m. OK GNU C++20 (64) TESTS 12 0 0
181841542 Short_Bit B Nov. 21, 2022, 5:07 a.m. OK GNU C++20 (64) TESTS 13 0 0
181841807 AdityaJha B Nov. 21, 2022, 5:13 a.m. OK GNU C++20 (64) TESTS 13 0 0
181843090 schniezel B Nov. 21, 2022, 5:39 a.m. OK GNU C++20 (64) TESTS 13 0 0
181844027 piyush_2001 B Nov. 21, 2022, 5:56 a.m. OK GNU C++20 (64) TESTS 13 0 0
181844175 Fantasy_T B Nov. 21, 2022, 5:59 a.m. OK GNU C++20 (64) TESTS 13 0 0
181812801 mtarunsai1999 B Nov. 20, 2022, 6:56 p.m. OK Go TESTS 12 31 204800
181806355 D05T0N B Nov. 20, 2022, 5:56 p.m. OK Go TESTS 12 31 35840000
181832064 the_unseen B Nov. 21, 2022, 1:24 a.m. OK Java 11 TESTS 12 171 0
181818264 Yousef_Badr B Nov. 20, 2022, 8:01 p.m. OK Java 11 TESTS 12 171 0
181812911 deepakanto B Nov. 20, 2022, 6:57 p.m. OK Java 11 TESTS 12 171 0
181812741 AadishJain B Nov. 20, 2022, 6:55 p.m. OK Java 11 TESTS 12 186 0
181800211 akwarrier304 B Nov. 20, 2022, 4:58 p.m. OK Java 11 TESTS 12 186 0
181787472 Siddharth_Singh_here B Nov. 20, 2022, 4:02 p.m. OK Java 11 TESTS 12 187 0
181837120 aditya2024 B Nov. 21, 2022, 3:29 a.m. OK Java 11 TESTS 12 187 0
181832756 a_shik_ B Nov. 21, 2022, 1:43 a.m. OK Java 11 TESTS 12 202 0
181830026 Tausiq B Nov. 21, 2022, 12:24 a.m. OK Java 11 TESTS 12 202 0
181807657 Hawater B Nov. 20, 2022, 6:06 p.m. OK Java 11 TESTS 12 202 0
181842773 sharadtandale2878 B Nov. 21, 2022, 5:32 a.m. OK Java 17 TESTS 13 171 512000
181829954 kkz666 B Nov. 21, 2022, 12:21 a.m. OK Java 17 TESTS 12 186 204800
181806396 xplorer B Nov. 20, 2022, 5:56 p.m. OK Java 17 TESTS 12 187 819200
181831133 _lwq_123_ B Nov. 21, 2022, 12:56 a.m. OK Java 17 TESTS 12 202 512000
181792608 akarshanand2810 B Nov. 20, 2022, 4:23 p.m. OK Java 17 TESTS 12 202 512000
181811846 HusanRich B Nov. 20, 2022, 6:45 p.m. OK Java 17 TESTS 12 217 716800
181788397 Divyansh_4281 B Nov. 20, 2022, 4:06 p.m. OK Java 17 TESTS 12 217 921600
181795937 YocyCraft B Nov. 20, 2022, 4:38 p.m. OK Java 17 TESTS 12 217 1126400
181788428 preeti_yadav_cs1 B Nov. 20, 2022, 4:06 p.m. OK Java 17 TESTS 12 218 512000
181815335 riya.rastogi_cs20 B Nov. 20, 2022, 7:24 p.m. OK Java 17 TESTS 12 218 614400
181840205 Mohammad_Anwar B Nov. 21, 2022, 4:40 a.m. OK Java 8 TESTS 12 93 0
181839898 Mohammad_Anwar B Nov. 21, 2022, 4:33 a.m. OK Java 8 TESTS 12 93 0
181797994 gagan_6730 B Nov. 20, 2022, 4:48 p.m. OK Java 8 TESTS 12 108 0
181794958 cys02 B Nov. 20, 2022, 4:34 p.m. OK Java 8 TESTS 12 108 0
181790084 Marbik B Nov. 20, 2022, 4:13 p.m. OK Java 8 TESTS 12 108 0
181789417 Mohamed308 B Nov. 20, 2022, 4:10 p.m. OK Java 8 TESTS 12 108 0
181844153 iamJatinYadav B Nov. 21, 2022, 5:59 a.m. OK Java 8 TESTS 13 109 0
181819231 vaibhavgawad B Nov. 20, 2022, 8:15 p.m. OK Java 8 TESTS 12 109 0
181806269 ganesh_6 B Nov. 20, 2022, 5:56 p.m. OK Java 8 TESTS 12 109 0
181792110 Zarby9834 B Nov. 20, 2022, 4:21 p.m. OK Java 8 TESTS 12 109 0
181832696 202103023413 B Nov. 21, 2022, 1:41 a.m. OK MS C++ 2017 TESTS 12 15 0
181794103 pyloolex B Nov. 20, 2022, 4:30 p.m. OK MS C++ 2017 TESTS 12 15 0
181786855 Sushi0077 B Nov. 20, 2022, 4 p.m. OK MS C++ 2017 TESTS 12 15 0
181785562 jrlqw B Nov. 20, 2022, 3:55 p.m. OK MS C++ 2017 TESTS 12 15 0
181797744 belief_010 B Nov. 20, 2022, 4:47 p.m. OK MS C++ 2017 TESTS 12 30 0
181828975 tan_delhi B Nov. 20, 2022, 11:49 p.m. OK PyPy 3 TESTS 12 77 1433600
181801536 dummy3 B Nov. 20, 2022, 5:03 p.m. OK PyPy 3 TESTS 12 77 1433600
181814330 34z12000 B Nov. 20, 2022, 7:13 p.m. OK PyPy 3 TESTS 12 77 1638400
181829096 NicholasTing B Nov. 20, 2022, 11:55 p.m. OK PyPy 3 TESTS 12 92 1433600
181833467 018429 B Nov. 21, 2022, 2:02 a.m. OK PyPy 3 TESTS 12 93 1433600
181793983 verngutz B Nov. 20, 2022, 4:29 p.m. OK PyPy 3 TESTS 12 93 1433600
181785623 AKSLEGION781126 B Nov. 20, 2022, 3:56 p.m. OK PyPy 3 TESTS 12 93 1433600
181785415 MohammadsadraSedighin B Nov. 20, 2022, 3:55 p.m. OK PyPy 3 TESTS 12 93 1433600
181806947 dorado7 B Nov. 20, 2022, 6:01 p.m. OK PyPy 3 TESTS 12 93 1536000
181793938 andriy.borzenkov B Nov. 20, 2022, 4:29 p.m. OK PyPy 3 TESTS 12 93 1536000
181814293 Nabeel_Ismaeel B Nov. 20, 2022, 7:12 p.m. OK PyPy 3-64 TESTS 12 61 1433600
181787069 iamsaurabhs B Nov. 20, 2022, 4:01 p.m. OK PyPy 3-64 TESTS 12 61 1536000
181820980 nov1ce_17171 B Nov. 20, 2022, 8:40 p.m. OK PyPy 3-64 TESTS 12 62 1536000
181816041 Arthis B Nov. 20, 2022, 7:33 p.m. OK PyPy 3-64 TESTS 12 62 1536000
181815430 applepi216 B Nov. 20, 2022, 7:25 p.m. OK PyPy 3-64 TESTS 12 62 1536000
181810132 nileshmalav B Nov. 20, 2022, 6:28 p.m. OK PyPy 3-64 TESTS 12 62 1536000
181809614 Trem0r B Nov. 20, 2022, 6:23 p.m. OK PyPy 3-64 TESTS 12 62 1536000
181797074 divyanshu_11 B Nov. 20, 2022, 4:44 p.m. OK PyPy 3-64 TESTS 12 62 1536000
181796819 Soumen_Sarkar B Nov. 20, 2022, 4:42 p.m. OK PyPy 3-64 TESTS 12 62 1536000
181793337 hvbird B Nov. 20, 2022, 4:27 p.m. OK PyPy 3-64 TESTS 12 62 1536000
181836817 odinluca B Nov. 21, 2022, 3:22 a.m. OK Python 3 TESTS 12 31 0
181842397 Vikas__Reddy B Nov. 21, 2022, 5:25 a.m. OK Python 3 TESTS 13 46 0
181836479 Ozodbek_official B Nov. 21, 2022, 3:13 a.m. OK Python 3 TESTS 12 46 0
181823836 Ozodbek_official B Nov. 20, 2022, 9:32 p.m. OK Python 3 TESTS 12 46 0
181823712 prathamnagaria B Nov. 20, 2022, 9:29 p.m. OK Python 3 TESTS 12 46 0
181819896 0.00 B Nov. 20, 2022, 8:24 p.m. OK Python 3 TESTS 12 46 0
181814653 eugalt B Nov. 20, 2022, 7:16 p.m. OK Python 3 TESTS 12 46 0
181810957 VijayGupta09 B Nov. 20, 2022, 6:36 p.m. OK Python 3 TESTS 12 46 0
181807018 unknown-user B Nov. 20, 2022, 6:01 p.m. OK Python 3 TESTS 12 46 0
181806302 VictorS B Nov. 20, 2022, 5:56 p.m. OK Python 3 TESTS 12 46 0
181830532 Spheniscine B Nov. 21, 2022, 12:39 a.m. OK Rust 2021 TESTS 12 0 102400
181785938 dog_with_a_tail B Nov. 20, 2022, 3:57 p.m. OK Rust 2021 TESTS 12 15 409600

remove filters

Back to search problems