Codeforces Round 858 (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
1806 Codeforces Round 858 (Div. 2) FINISHED False 8100 52682099 March 18, 2023, 12:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 17909 ) B Mex Master PROGRAMMING constructive algorithms greedy

B'You are given an array a of length n . The score of a is the MEX ^{ dagger} of [a_1+a_2,a_2+a_3, ldots,a_{n-1}+a_n] . Find the minimum score of a if you are allowed to rearrange elements of a in any order. Note that you are not required to construct the array a that achieves the minimum score. ^{ dagger} The MEX (minimum excluded) of an array is the smallest non-negative integer that does not belong to the array. For instance: The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The description of test cases follows. The first line of each test case contains a single integer n ( 2 <= n <= 2 cdot10^5 ). The second line of each test case contains n integers a_1, a_2, ldots, a_n ( 0 <= a_i <= 2 cdot 10^5 ). It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, output the minimum score of a after rearranging the elements of a in any order. In the first test case, it is optimal to rearrange a as [0,0] , the score of this array is the MEX of [0+0]=[0] , which is 1 . In the second test case, it is optimal to rearrange a as [0,1,0] , the score of this array is the MEX of [0+1,1+0]=[1,1] , which is 0 . '...

Tutorials

Codeforces Round #858 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
197988382 VorivaN B March 18, 2023, 4:02 p.m. OK Clang++17 Diagnostics TESTS 9 655 0
197989807 xmyhhxuedaima B March 18, 2023, 4:13 p.m. OK Clang++17 Diagnostics TESTS 9 763 1638400
197986714 sreehithanamana B March 18, 2023, 3:50 p.m. OK Clang++20 Diagnostics TESTS 9 826 3174400
198031324 FST_Forces B March 19, 2023, 1:12 a.m. OK FPC TESTS 9 46 1638400
198030708 ghy401564 B March 19, 2023, 12:54 a.m. OK GNU C11 TESTS 9 46 0
198021332 mrniko B March 18, 2023, 9:10 p.m. OK GNU C11 TESTS 9 46 0
197985867 shyam26 B March 18, 2023, 3:44 p.m. OK GNU C11 TESTS 9 46 819200
197986045 shyam26 B March 18, 2023, 3:46 p.m. OK GNU C11 TESTS 9 46 819200
197989960 Hantur B March 18, 2023, 4:14 p.m. OK GNU C11 TESTS 9 46 819200
197995423 mdadnan B March 18, 2023, 4:56 p.m. OK GNU C11 TESTS 9 46 819200
198021370 moriarty_L B March 18, 2023, 9:11 p.m. OK GNU C11 TESTS 9 46 819200
198036895 Joe2357 B March 19, 2023, 3:18 a.m. OK GNU C11 TESTS 9 62 0
197981022 namanpahwa20 B March 18, 2023, 3:13 p.m. OK GNU C11 TESTS 9 62 819200
198024309 abdullahrashed055 B March 18, 2023, 9:59 p.m. OK GNU C11 TESTS 9 62 819200
198033398 wxt1221 B March 19, 2023, 2:03 a.m. OK GNU C++14 TESTS 9 31 0
198032192 eacnscnj B March 19, 2023, 1:34 a.m. OK GNU C++14 TESTS 9 31 819200
197986556 a999999 B March 18, 2023, 3:49 p.m. OK GNU C++14 TESTS 9 31 10035200
198048118 Kabuda B March 19, 2023, 6:01 a.m. OK GNU C++14 TESTS 9 46 0
198048088 ZERO_AKG B March 19, 2023, 6:01 a.m. OK GNU C++14 TESTS 9 46 0
198047562 aravind2021 B March 19, 2023, 5:56 a.m. OK GNU C++14 TESTS 9 46 0
198046523 learner_RR B March 19, 2023, 5:46 a.m. OK GNU C++14 TESTS 9 46 0
198044036 whdywjd B March 19, 2023, 5:19 a.m. OK GNU C++14 TESTS 9 46 0
198042057 wust-zzl B March 19, 2023, 4:53 a.m. OK GNU C++14 TESTS 9 46 0
198040247 Kaedehara_Kazuha_ B March 19, 2023, 4:24 a.m. OK GNU C++14 TESTS 9 46 0
197999635 Sha_mim B March 18, 2023, 5:29 p.m. OK GNU C++17 TESTS 9 31 819200
198047159 karl_sc B March 19, 2023, 5:52 a.m. OK GNU C++17 TESTS 9 46 0
198047253 sarthak.sbiswas B March 19, 2023, 5:53 a.m. OK GNU C++17 TESTS 9 46 0
198047667 lnahg_1 B March 19, 2023, 5:57 a.m. OK GNU C++17 TESTS 9 46 0
198046371 ajaykumar_28 B March 19, 2023, 5:45 a.m. OK GNU C++17 TESTS 9 46 0
198041567 mkv29 B March 19, 2023, 4:45 a.m. OK GNU C++17 TESTS 9 46 0
198043183 nipungoyal03 B March 19, 2023, 5:09 a.m. OK GNU C++17 TESTS 9 46 0
198043893 Small_Black B March 19, 2023, 5:17 a.m. OK GNU C++17 TESTS 9 46 0
198044537 ChetanAjay2708 B March 19, 2023, 5:25 a.m. OK GNU C++17 TESTS 9 46 0
198045574 The_Dragon_Warrior B March 19, 2023, 5:36 a.m. OK GNU C++17 TESTS 9 46 0
198031109 JWRuixi B March 19, 2023, 1:06 a.m. OK GNU C++17 (64) TESTS 9 15 1843200
198036509 hlrf1571513243 B March 19, 2023, 3:10 a.m. OK GNU C++17 (64) TESTS 9 31 0
197980233 efficient B March 18, 2023, 3:09 p.m. OK GNU C++17 (64) TESTS 9 31 0
197989450 royjibesh351 B March 18, 2023, 4:10 p.m. OK GNU C++17 (64) TESTS 9 31 0
198000437 Kato_Megumi B March 18, 2023, 5:35 p.m. OK GNU C++17 (64) TESTS 9 31 0
198043219 ankancool B March 19, 2023, 5:09 a.m. OK GNU C++17 (64) TESTS 9 31 0
197976132 Agamenon B March 18, 2023, 2:49 p.m. OK GNU C++17 (64) TESTS 9 31 819200
197983561 Owmicron B March 18, 2023, 3:28 p.m. OK GNU C++17 (64) TESTS 9 31 819200
197982699 Once_I_Liked_AGirl B March 18, 2023, 3:23 p.m. OK GNU C++17 (64) TESTS 9 31 819200
197976253 vishalagrawal B March 18, 2023, 2:49 p.m. OK GNU C++17 (64) TESTS 9 31 819200
198039614 quan0rznt B March 19, 2023, 4:13 a.m. OK GNU C++20 (64) TESTS 9 15 0
198040328 Clitch B March 19, 2023, 4:26 a.m. OK GNU C++20 (64) TESTS 9 15 0
197977390 LiuWilliam B March 18, 2023, 2:54 p.m. OK GNU C++20 (64) TESTS 9 15 0
198038971 hvmegy B March 19, 2023, 4 a.m. OK GNU C++20 (64) TESTS 9 15 0
198000416 Satoru B March 18, 2023, 5:35 p.m. OK GNU C++20 (64) TESTS 9 30 0
198044174 cold7 B March 19, 2023, 5:21 a.m. OK GNU C++20 (64) TESTS 9 31 0
198047364 Mr_Robot6969 B March 19, 2023, 5:54 a.m. OK GNU C++20 (64) TESTS 9 31 0
198045754 hasanmubarok B March 19, 2023, 5:39 a.m. OK GNU C++20 (64) TESTS 9 31 0
198045611 zxhit B March 19, 2023, 5:37 a.m. OK GNU C++20 (64) TESTS 9 31 0
198044070 BibarysK B March 19, 2023, 5:19 a.m. OK GNU C++20 (64) TESTS 9 31 0
197985662 furating B March 18, 2023, 3:42 p.m. OK Java 11 TESTS 9 171 614400
198047100 vijender_8601 B March 19, 2023, 5:52 a.m. OK Java 11 TESTS 9 186 512000
197981016 oblivionking62 B March 18, 2023, 3:13 p.m. OK Java 11 TESTS 9 187 409600
197971463 Panther369 B March 18, 2023, 2:15 p.m. OK Java 11 TESTS 9 187 409600
197985797 deepakanto B March 18, 2023, 3:43 p.m. OK Java 11 TESTS 9 218 614400
198021444 coffeeCoder69 B March 18, 2023, 9:12 p.m. OK Java 11 TESTS 9 248 614400
198042597 kasiru_69 B March 19, 2023, 5:01 a.m. OK Java 11 TESTS 9 264 614400
197972026 chinnamsaireddy1369 B March 18, 2023, 2:16 p.m. OK Java 11 TESTS 9 436 1126400
197993751 dhruv.p6 B March 18, 2023, 4:43 p.m. OK Java 17 TESTS 9 170 1638400
198010952 LucunJi B March 18, 2023, 7:07 p.m. OK Java 17 TESTS 9 171 2252800
198014214 swatishivam23 B March 18, 2023, 7:40 p.m. OK Java 17 TESTS 9 186 2252800
198013657 Badass_Nemesis B March 18, 2023, 7:35 p.m. OK Java 17 TESTS 9 187 2355200
197976177 vikash_45 B March 18, 2023, 2:49 p.m. OK Java 17 TESTS 9 202 1740800
198022211 faresbadr316 B March 18, 2023, 9:24 p.m. OK Java 17 TESTS 9 233 2048000
197983024 mcrash12 B March 18, 2023, 3:25 p.m. OK Java 17 TESTS 9 234 2048000
198040520 Jatinydv17 B March 19, 2023, 4:29 a.m. OK Java 17 TESTS 9 249 1740800
198005461 nigamabhai03 B March 18, 2023, 6:16 p.m. OK Java 17 TESTS 9 264 1740800
197997588 manish47 B March 18, 2023, 5:13 p.m. OK Java 17 TESTS 9 265 1843200
198011846 Rolex_shivam B March 18, 2023, 7:16 p.m. OK Java 8 TESTS 9 108 0
197989626 ankit_0207 B March 18, 2023, 4:11 p.m. OK Java 8 TESTS 9 109 0
198007624 SweetAsCocaine B March 18, 2023, 6:34 p.m. OK Java 8 TESTS 9 124 0
198009134 ashdeepsingh1997 B March 18, 2023, 6:48 p.m. OK Java 8 TESTS 9 139 0
198032016 huvz B March 19, 2023, 1:30 a.m. OK Java 8 TESTS 9 140 0
198048224 q2045891621. B March 19, 2023, 6:02 a.m. OK Java 8 TESTS 9 171 0
198017649 elgamel B March 18, 2023, 8:18 p.m. OK Java 8 TESTS 9 171 0
197981446 Koka B March 18, 2023, 3:16 p.m. OK Java 8 TESTS 9 186 102400
197981243 handle007 B March 18, 2023, 3:15 p.m. OK Java 8 TESTS 9 186 102400
198006102 solver2021 B March 18, 2023, 6:21 p.m. OK Java 8 TESTS 9 296 0
197981843 nojh069 B March 18, 2023, 3:18 p.m. OK MS C++ 2017 TESTS 9 124 819200
197983135 fushi2218 B March 18, 2023, 3:26 p.m. OK MS C++ 2017 TESTS 9 139 0
198040198 yosefeyad024 B March 19, 2023, 4:23 a.m. OK MS C++ 2017 TESTS 9 140 0
198019370 TS2202 B March 18, 2023, 8:41 p.m. OK MS C++ 2017 TESTS 9 140 0
198008764 A_Lotfy B March 18, 2023, 6:45 p.m. OK MS C++ 2017 TESTS 9 140 0
197991670 AlexandraV B March 18, 2023, 4:27 p.m. OK MS C++ 2017 TESTS 9 140 0
197983213 fushi2218 B March 18, 2023, 3:26 p.m. OK MS C++ 2017 TESTS 9 140 0
197981910 fushi2218 B March 18, 2023, 3:19 p.m. OK MS C++ 2017 TESTS 9 140 0
198000216 allex36584057 B March 18, 2023, 5:33 p.m. OK MS C++ 2017 TESTS 9 140 1433600
197971797 YangTuo B March 18, 2023, 2:16 p.m. OK MS C++ 2017 TESTS 9 140 1638400
197987861 light_ab B March 18, 2023, 3:58 p.m. OK PyPy 3 TESTS 9 218 16588800
197986337 Red_eye_ B March 18, 2023, 3:47 p.m. OK PyPy 3 TESTS 9 327 15667200
197977854 21bce007 B March 18, 2023, 2:56 p.m. OK PyPy 3 TESTS 9 358 9830400
198034692 gujik B March 19, 2023, 2:32 a.m. OK PyPy 3 TESTS 9 389 15667200
198023374 bpdolson B March 18, 2023, 9:44 p.m. OK PyPy 3 TESTS 9 389 16076800
198012794 sorcerer_21 B March 18, 2023, 7:25 p.m. OK PyPy 3 TESTS 9 390 15769600
198002751 AnuragRoy485 B March 18, 2023, 5:54 p.m. OK PyPy 3 TESTS 9 390 16486400
198011169 Milana146 B March 18, 2023, 7:09 p.m. OK PyPy 3 TESTS 9 405 15667200
197988141 jvatsal0709 B March 18, 2023, 4 p.m. OK PyPy 3 TESTS 9 405 15667200
198012562 zx4r B March 18, 2023, 7:23 p.m. OK PyPy 3 TESTS 9 405 15769600
198010915 smilence B March 18, 2023, 7:06 p.m. OK PyPy 3-64 TESTS 9 109 15769600
198033511 RobinFromTheHood B March 19, 2023, 2:06 a.m. OK PyPy 3-64 TESTS 9 109 21299200
197981831 gardengnome B March 18, 2023, 3:18 p.m. OK PyPy 3-64 TESTS 9 109 22835200
197998682 poornaTheja B March 18, 2023, 5:22 p.m. OK PyPy 3-64 TESTS 9 124 15872000
197983680 Mohamed_Hamed B March 18, 2023, 3:29 p.m. OK PyPy 3-64 TESTS 9 124 17305600
197988310 ankitesh B March 18, 2023, 4:01 p.m. OK PyPy 3-64 TESTS 9 124 20992000
198028366 kavorka B March 18, 2023, 11:41 p.m. OK PyPy 3-64 TESTS 9 124 22016000
198046241 harshk_52 B March 19, 2023, 5:43 a.m. OK PyPy 3-64 TESTS 9 124 22835200
197983022 kluchikhin B March 18, 2023, 3:25 p.m. OK PyPy 3-64 TESTS 9 124 22835200
198035806 Youarenotgood B March 19, 2023, 2:55 a.m. OK PyPy 3-64 TESTS 9 139 22732800
197983116 biltharesatyendra B March 18, 2023, 3:26 p.m. OK Python 2 TESTS 9 140 6348800
197976166 eugalt B March 18, 2023, 2:49 p.m. OK Python 3 TESTS 9 77 7168000
198008445 sahil45 B March 18, 2023, 6:42 p.m. OK Python 3 TESTS 9 124 9420800
198004482 MubassirSadik B March 18, 2023, 6:08 p.m. OK Python 3 TESTS 9 140 9420800
197979850 jahnavikanduri31 B March 18, 2023, 3:06 p.m. OK Python 3 TESTS 9 140 10137600
197980373 Romil_ B March 18, 2023, 3:09 p.m. OK Python 3 TESTS 9 155 8192000
197977630 Imari B March 18, 2023, 2:55 p.m. OK Python 3 TESTS 9 155 8601600
198019392 Almotasembelah_Sharaf B March 18, 2023, 8:41 p.m. OK Python 3 TESTS 9 155 8806400
198003725 GSD_SANDEEP B March 18, 2023, 6:02 p.m. OK Python 3 TESTS 9 155 8806400
198001965 prateekb1729 B March 18, 2023, 5:47 p.m. OK Python 3 TESTS 9 155 8806400
198000533 sanyasachan20 B March 18, 2023, 5:36 p.m. OK Python 3 TESTS 9 155 8806400

remove filters

Back to search problems