Codeforces Global Round 20

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
1672 Codeforces Global Round 20 FINISHED False 10800 86457263 April 23, 2022, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 13404 ) C Unequal Array PROGRAMMING constructive algorithms greedy implementation 1100

B'You are given an array a of length n . We define the equality of the array as the number of indices 1 <= i <= n - 1 such that a_i = a_{i + 1} . We are allowed to do the following operation: Find the minimum number of operations needed such that the equality of the array is less than or equal to 1 . Each test contains multiple test cases. The first line contains a single integer t ( 1 <= q t <= q 10^4 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains an integer n ( 2 <= n <= 2 cdot 10 ^ 5 ) -- the length of array a . The second line of each test case contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= 10^9 ) -- elements of the array. It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10 ^ 5 For each test case, print the minimum number of operations needed. In the first test case, we can select i=2 and x=2 to form [1, 2, 2, 1, 1] . Then, we can select i=3 and x=3 to form [1, 2, 3, 3, 1] . In the second test case, we can select i=3 and x=100 to form [2, 1, 100, 100, 2] . '...

Tutorials

Global Round 20 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
154864945 rainboy C April 24, 2022, 2:56 p.m. OK GNU C11 TESTS 14 77 819200 1100
154864422 I_AM_LIGHTENING C April 24, 2022, 2:51 p.m. OK GNU C11 TESTS 14 78 1638400 1100
154789673 TheNeverChosen C April 23, 2022, 9:03 p.m. OK GNU C++14 TESTS 14 46 0 1100
154789849 TheNeverChosen C April 23, 2022, 9:06 p.m. OK GNU C++14 TESTS 14 46 0 1100
154789793 TheNeverChosen C April 23, 2022, 9:05 p.m. OK GNU C++14 TESTS 14 46 0 1100
154789945 TheNeverChosen C April 23, 2022, 9:08 p.m. OK GNU C++14 TESTS 14 46 0 1100
154876717 Akash_champ C April 24, 2022, 5:10 p.m. OK GNU C++14 TESTS 14 46 819200 1100
154868023 usx21329 C April 24, 2022, 3:30 p.m. OK GNU C++14 TESTS 14 46 819200 1100
154838184 complacent C April 24, 2022, 10:40 a.m. OK GNU C++14 TESTS 14 46 819200 1100
154837477 Hush C April 24, 2022, 10:31 a.m. OK GNU C++14 TESTS 14 46 819200 1100
154829256 yiwu C April 24, 2022, 8:55 a.m. OK GNU C++14 TESTS 14 46 819200 1100
154906806 rakreeritris C April 25, 2022, 5:44 a.m. OK GNU C++14 TESTS 14 46 819200 1100
154887632 Anchord C April 24, 2022, 8:14 p.m. OK GNU C++17 TESTS 14 46 819200 1100
154883522 codefresher C April 24, 2022, 6:55 p.m. OK GNU C++17 TESTS 14 46 819200 1100
154850916 Ebiswas7516 C April 24, 2022, 12:35 p.m. OK GNU C++17 TESTS 14 46 819200 1100
154840850 Injection C April 24, 2022, 11:10 a.m. OK GNU C++17 TESTS 14 46 819200 1100
154840207 raviciii C April 24, 2022, 11:04 a.m. OK GNU C++17 TESTS 14 46 819200 1100
154840113 ravicii C April 24, 2022, 11:03 a.m. OK GNU C++17 TESTS 14 46 819200 1100
154817294 pengge66 C April 24, 2022, 6:47 a.m. OK GNU C++17 TESTS 14 46 819200 1100
154813957 sugmedic C April 24, 2022, 6:05 a.m. OK GNU C++17 TESTS 14 46 819200 1100
154811983 s39202972 C April 24, 2022, 5:39 a.m. OK GNU C++17 TESTS 14 46 819200 1100
154887154 RFSS_ C April 24, 2022, 8:05 p.m. OK GNU C++17 TESTS 14 46 819200 1100
154811477 CE_WA_TLE C April 24, 2022, 5:32 a.m. OK GNU C++17 (64) TESTS 14 15 6348800 1100
154814185 neo_37 C April 24, 2022, 6:08 a.m. OK GNU C++17 (64) TESTS 14 31 819200 1100
154902568 est_stella C April 25, 2022, 4:15 a.m. OK GNU C++17 (64) TESTS 14 31 819200 1100
154828720 missis_garrison C April 24, 2022, 8:50 a.m. OK GNU C++17 (64) TESTS 14 31 819200 1100
154812643 torisasami C April 24, 2022, 5:48 a.m. OK GNU C++17 (64) TESTS 14 31 819200 1100
154798155 yaoveil C April 24, 2022, 12:40 a.m. OK GNU C++17 (64) TESTS 14 31 819200 1100
154780935 mesbah19 C April 23, 2022, 6:44 p.m. OK GNU C++17 (64) TESTS 14 31 819200 1100
154780795 MohamedAboOkail C April 23, 2022, 6:42 p.m. OK GNU C++17 (64) TESTS 14 31 1638400 1100
154779089 tonyli00000 C April 23, 2022, 6:20 p.m. OK GNU C++17 (64) TESTS 14 31 1638400 1100
154794484 epsilon_573 C April 23, 2022, 10:47 p.m. OK GNU C++17 (64) TESTS 14 31 1638400 1100
154821824 Mahedi_H_Rif C April 24, 2022, 7:36 a.m. OK GNU C++20 (64) TESTS 14 31 0 1100
154777955 caipng C April 23, 2022, 6:07 p.m. OK GNU C++20 (64) TESTS 14 31 0 1100
154878483 panthera69tigris C April 24, 2022, 5:36 p.m. OK GNU C++20 (64) TESTS 14 31 819200 1100
154875317 AR69420 C April 24, 2022, 4:49 p.m. OK GNU C++20 (64) TESTS 14 31 819200 1100
154860900 Mazen.Ali C April 24, 2022, 2:12 p.m. OK GNU C++20 (64) TESTS 14 31 819200 1100
154870550 sajal17466 C April 24, 2022, 3:53 p.m. OK GNU C++20 (64) TESTS 14 31 819200 1100
154894872 I_am_Aviral C April 24, 2022, 10:53 p.m. OK GNU C++20 (64) TESTS 14 31 819200 1100
154889341 Venti_chai C April 24, 2022, 8:44 p.m. OK GNU C++20 (64) TESTS 14 31 819200 1100
154880495 princepratikk C April 24, 2022, 6:06 p.m. OK GNU C++20 (64) TESTS 14 31 819200 1100
154879757 luniam3195 C April 24, 2022, 5:55 p.m. OK GNU C++20 (64) TESTS 14 31 819200 1100
154795687 0x3F C April 23, 2022, 11:24 p.m. OK Go TESTS 14 140 3174400 1100
154808320 Satyaa C April 24, 2022, 4:46 a.m. OK Java 11 TESTS 14 171 0 1100
154888910 vijender_8601 C April 24, 2022, 8:37 p.m. OK Java 11 TESTS 14 202 0 1100
154782522 Omar_Mohammad C April 23, 2022, 7:07 p.m. OK Java 11 TESTS 14 202 0 1100
154859733 palindro.me C April 24, 2022, 2 p.m. OK Java 11 TESTS 14 202 0 1100
154833646 __Serendipity C April 24, 2022, 9:45 a.m. OK Java 11 TESTS 14 202 0 1100
154824119 the_unseen C April 24, 2022, 8:01 a.m. OK Java 11 TESTS 14 217 0 1100
154776758 _abstract_ C April 23, 2022, 5:55 p.m. OK Java 11 TESTS 14 217 3993600 1100
154809252 sf14t C April 24, 2022, 5:02 a.m. OK Java 11 TESTS 14 218 0 1100
154811799 SAMAD_ C April 24, 2022, 5:37 a.m. OK Java 11 TESTS 14 234 0 1100
154788945 bdomokos C April 23, 2022, 8:49 p.m. OK Java 11 TESTS 14 248 0 1100
154800644 Ahmad_Hoseiny C April 24, 2022, 1:55 a.m. OK Java 8 TESTS 14 124 2764800 1100
154782535 arutsudar C April 23, 2022, 7:07 p.m. OK Java 8 TESTS 14 124 2969600 1100
154811569 govindrajput C April 24, 2022, 5:34 a.m. OK Java 8 TESTS 14 139 2662400 1100
154774002 invincible777 C April 23, 2022, 5:32 p.m. OK Java 8 TESTS 14 139 2969600 1100
154835734 GonFreecss2830 C April 24, 2022, 10:09 a.m. OK Java 8 TESTS 14 140 2764800 1100
154806005 alibaba C April 24, 2022, 3:57 a.m. OK Java 8 TESTS 14 140 2764800 1100
154891702 Diaa12360 C April 24, 2022, 9:31 p.m. OK Java 8 TESTS 14 140 2867200 1100
154776353 var_hash C April 23, 2022, 5:51 p.m. OK Java 8 TESTS 14 155 2662400 1100
154798727 Ahmad_Hoseiny C April 24, 2022, 12:59 a.m. OK Java 8 TESTS 14 155 2764800 1100
154806813 -crazy_coder- C April 24, 2022, 4:14 a.m. OK Java 8 TESTS 14 186 17817600 1100
154779776 Mbt925 C April 23, 2022, 6:28 p.m. OK Kotlin 1.6 TESTS 14 280 0 1100
154784659 darkl0rd C April 23, 2022, 7:38 p.m. OK Kotlin 1.6 TESTS 14 312 18329600 1100
154902079 dogoeswoof C April 25, 2022, 4:03 a.m. OK MS C++ 2017 TESTS 14 202 819200 1100
154870687 wundersmith C April 24, 2022, 3:54 p.m. OK MS C++ 2017 TESTS 14 202 921600 1100
154853130 1371597521 C April 24, 2022, 12:56 p.m. OK MS C++ 2017 TESTS 14 218 819200 1100
154852905 1371597521 C April 24, 2022, 12:54 p.m. OK MS C++ 2017 TESTS 14 234 819200 1100
154795350 fgwiebfaoish C April 23, 2022, 11:12 p.m. OK .NET Core C# TESTS 14 92 16384000 1100
154776322 1_2_3_4_5_9 C April 23, 2022, 5:51 p.m. OK PyPy 2 TESTS 14 155 17100800 1100
154776635 lemiao12 C April 23, 2022, 5:53 p.m. OK PyPy 3 TESTS 14 156 19558400 1100
154773789 wizardrabbit C April 23, 2022, 5:31 p.m. OK PyPy 3 TESTS 14 280 15360000 1100
154776081 KingMace C April 23, 2022, 5:48 p.m. OK PyPy 3 TESTS 14 280 18534400 1100
154885028 BingHa C April 24, 2022, 7:24 p.m. OK PyPy 3 TESTS 14 295 15360000 1100
154783532 ambs_ C April 23, 2022, 7:21 p.m. OK PyPy 3 TESTS 14 311 19148800 1100
154904555 Ayushman_123 C April 25, 2022, 4:58 a.m. OK PyPy 3 TESTS 14 420 21299200 1100
154831969 codicon C April 24, 2022, 9:26 a.m. OK PyPy 3 TESTS 14 452 19148800 1100
154823180 y.vvt C April 24, 2022, 7:51 a.m. OK PyPy 3 TESTS 14 482 19148800 1100
154813224 Bad_day_toCode C April 24, 2022, 5:55 a.m. OK PyPy 3 TESTS 14 498 31641600 1100
154812473 _Frust C April 24, 2022, 5:46 a.m. OK PyPy 3-64 TESTS 14 124 22732800 1100
154827196 vermakunal088 C April 24, 2022, 8:35 a.m. OK PyPy 3-64 TESTS 14 155 23040000 1100
154853606 pythonist_viking C April 24, 2022, 1 p.m. OK PyPy 3-64 TESTS 14 155 24985600 1100
154803604 rivnam C April 24, 2022, 3:06 a.m. OK PyPy 3-64 TESTS 14 202 28979200 1100
154811924 sakshatmali C April 24, 2022, 5:38 a.m. OK PyPy 3-64 TESTS 14 233 49152000 1100
154838705 ganesh_singh C April 24, 2022, 10:46 a.m. OK PyPy 3-64 TESTS 14 249 28467200 1100
154793325 MistaAsh C April 23, 2022, 10:17 p.m. OK PyPy 3-64 TESTS 14 264 28364800 1100
154814772 hsh8086 C April 24, 2022, 6:16 a.m. OK PyPy 3-64 TESTS 14 280 27238400 1100
154878243 del-user-774348 C April 24, 2022, 5:32 p.m. OK PyPy 3-64 TESTS 14 280 28364800 1100
154797737 majay1638 C April 24, 2022, 12:26 a.m. OK PyPy 3-64 TESTS 14 295 26521600 1100
154776746 shkaal C April 23, 2022, 5:54 p.m. OK Python 3 TESTS 14 139 15667200 1100
154827787 sawvik.dipto10 C April 24, 2022, 8:41 a.m. OK Python 3 TESTS 14 186 15769600 1100
154874951 yashmuchhala C April 24, 2022, 4:42 p.m. OK Python 3 TESTS 14 187 15974400 1100
154777052 praditha_alwis C April 23, 2022, 5:58 p.m. OK Python 3 TESTS 14 202 15974400 1100
154875146 yashmuchhala C April 24, 2022, 4:46 p.m. OK Python 3 TESTS 14 217 15974400 1100
154879212 mugiwaraa C April 24, 2022, 5:47 p.m. OK Python 3 TESTS 14 218 15769600 1100
154780963 Bishwanath C April 23, 2022, 6:44 p.m. OK Python 3 TESTS 14 218 15974400 1100
154786399 Black.Ninja C April 23, 2022, 8:06 p.m. OK Python 3 TESTS 14 233 15667200 1100
154830711 Ak_basniwal C April 24, 2022, 9:11 a.m. OK Python 3 TESTS 14 233 15974400 1100
154787949 sayedElgholy C April 23, 2022, 8:32 p.m. OK Python 3 TESTS 14 248 15974400 1100

remove filters

Back to search problems