Codeforces Global Round 9

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
1375 Codeforces Global Round 9 FINISHED False 9000 137949299 July 4, 2020, 2:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 9274 ) D Replace by MEX PROGRAMMING brute force constructive algorithms implementation

B"You're given an array of n integers between 0 and n inclusive. In one operation, you can choose any element of the array and replace it by the MEX of the elements of the array (which may change after the operation). For example, if the current array is [0, 2, 2, 1, 4] , you can choose the second element and replace it by the MEX of the present elements -- 3 . Array will become [0, 3, 2, 1, 4] . You must make the array non-decreasing, using at most 2n operations. It can be proven that it is always possible. Please note that you do not have to minimize the number of operations. If there are many solutions, you can print any of them. xe2 x80 x93 An array b[1 ldots n] is non-decreasing if and only if b_1 <= b_2 <= ldots <= b_n . The MEX (minimum excluded) of an array is the smallest non-negative integer that does not belong to the array. For instance: It's worth mentioning that the MEX of an array of length n is always between 0 and n inclusive. The first line contains a single integer t ( 1 <= t <= 200 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains a single integer n ( 3 <= n <= 1000 ) -- length of the array. The second line of each test case contains n integers a_1, ldots, a_n ( 0 <= a_i <= n ) -- elements of the array. Note that they don't have to be distinct. It is guaranteed that the sum of n over all test cases doesn't exceed 1000 . For each test case, you must output two lines: The first line must contain a single integer k ( 0 <= k <= 2n ) -- the number of operations you perform. The second line must contain k integers x_1, ldots, x_k ( 1 <= x_i <= n ), where x_i is the index chosen for the i -th operation. If there are many solutions, you can find any of them. Please remember that it is not required to minimize "...

Tutorials

79731

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
85958689 Gassa D July 4, 2020, 3:32 p.m. OK D TESTS 43 31 10854400
85978245 daut-dlang D July 4, 2020, 4:21 p.m. OK D TESTS 43 857 10854400
85981500 yhc19990202 D July 4, 2020, 4:31 p.m. OK GNU C11 TESTS 43 46 3686400
85971599 pengin_2000 D July 4, 2020, 4:03 p.m. OK GNU C11 TESTS 43 46 3686400
85969798 physics0523 D July 4, 2020, 3:58 p.m. OK GNU C11 TESTS 43 46 3993600
85969295 BQAC D July 4, 2020, 3:56 p.m. OK GNU C++11 TESTS 43 30 3891200
86020550 caidzh D July 5, 2020, 3:25 a.m. OK GNU C++11 TESTS 43 30 4198400
85991421 fried-chicken D July 4, 2020, 5:01 p.m. OK GNU C++11 TESTS 43 30 4198400
85964727 alocytus D July 4, 2020, 3:45 p.m. OK GNU C++11 TESTS 43 31 3686400
86019865 baigeiguai D July 5, 2020, 3:07 a.m. OK GNU C++11 TESTS 43 31 3891200
86018685 danxmz2006 D July 5, 2020, 2:31 a.m. OK GNU C++11 TESTS 43 31 3891200
86017897 DWAE86 D July 5, 2020, 2:04 a.m. OK GNU C++11 TESTS 43 31 3891200
86020474 nonnon D July 5, 2020, 3:22 a.m. OK GNU C++11 TESTS 43 31 3891200
86020568 huanggs D July 5, 2020, 3:25 a.m. OK GNU C++11 TESTS 43 31 3891200
86021285 anodiebird D July 5, 2020, 3:46 a.m. OK GNU C++11 TESTS 43 31 3891200
85976907 Dream.to D July 4, 2020, 4:17 p.m. OK GNU C++14 TESTS 43 31 3686400
86022297 2010160220 D July 5, 2020, 4:14 a.m. OK GNU C++14 TESTS 43 31 3788800
86021214 lin_rany D July 5, 2020, 3:44 a.m. OK GNU C++14 TESTS 43 31 3788800
86021142 Ardnelias D July 5, 2020, 3:42 a.m. OK GNU C++14 TESTS 43 31 3788800
86020283 acccccccc D July 5, 2020, 3:18 a.m. OK GNU C++14 TESTS 43 31 3788800
86019639 Contna D July 5, 2020, 3:02 a.m. OK GNU C++14 TESTS 43 31 3788800
86018150 A.K.E.E. D July 5, 2020, 2:13 a.m. OK GNU C++14 TESTS 43 31 3788800
86024060 ghu_coder D July 5, 2020, 4:57 a.m. OK GNU C++14 TESTS 43 31 3788800
86026154 Shisuko D July 5, 2020, 5:38 a.m. OK GNU C++14 TESTS 43 31 3788800
86022909 foolishhmy D July 5, 2020, 4:30 a.m. OK GNU C++14 TESTS 43 31 3788800
85980225 Aditya0412 D July 4, 2020, 4:27 p.m. OK GNU C++17 TESTS 43 30 3891200
85961873 _Rebellion D July 4, 2020, 3:39 p.m. OK GNU C++17 TESTS 43 31 3686400
86015841 nirjhorJU D July 5, 2020, 12:28 a.m. OK GNU C++17 TESTS 43 31 3788800
86020934 Sdchr D July 5, 2020, 3:35 a.m. OK GNU C++17 TESTS 43 31 3788800
86019570 wazxy D July 5, 2020, 2:59 a.m. OK GNU C++17 TESTS 43 31 3788800
86017213 Nezzar D July 5, 2020, 1:34 a.m. OK GNU C++17 TESTS 43 31 3788800
86016519 Dhruba10414 D July 5, 2020, 12:59 a.m. OK GNU C++17 TESTS 43 31 3788800
86016269 sdlwsl D July 5, 2020, 12:47 a.m. OK GNU C++17 TESTS 43 31 3788800
86016072 sdlwsl D July 5, 2020, 12:39 a.m. OK GNU C++17 TESTS 43 31 3788800
86014414 CPX99 D July 4, 2020, 11:15 p.m. OK GNU C++17 TESTS 43 31 3788800
85985156 ToxicPie9 D July 4, 2020, 4:42 p.m. OK GNU C++17 (64) TESTS 43 30 4300800
85974118 emorgan5289 D July 4, 2020, 4:09 p.m. OK GNU C++17 (64) TESTS 43 30 4300800
85955778 Zayin D July 4, 2020, 3:26 p.m. OK GNU C++17 (64) TESTS 43 30 4403200
85981606 Leonidas D July 4, 2020, 4:31 p.m. OK GNU C++17 (64) TESTS 43 30 4403200
85989462 ha15 D July 4, 2020, 4:55 p.m. OK GNU C++17 (64) TESTS 43 30 4403200
85999685 iamsk D July 4, 2020, 5:53 p.m. OK GNU C++17 (64) TESTS 43 30 4403200
85980749 tugsuu D July 4, 2020, 4:29 p.m. OK GNU C++17 (64) TESTS 43 30 4403200
86022847 xuziyuan D July 5, 2020, 4:28 a.m. OK GNU C++17 (64) TESTS 43 30 4608000
86015369 meox D July 5, 2020, 12:04 a.m. OK GNU C++17 (64) TESTS 43 31 4300800
86015412 19992147 D July 5, 2020, 12:07 a.m. OK GNU C++17 (64) TESTS 43 31 4300800
85986714 Xylenox D July 4, 2020, 4:47 p.m. OK Go TESTS 43 140 15974400
86023405 mphillotry D July 5, 2020, 4:42 a.m. OK Java 11 TESTS 43 187 23859200
86014980 jay_vish D July 4, 2020, 11:42 p.m. OK Java 11 TESTS 43 187 23961600
86001685 14visheshjain D July 4, 2020, 6:13 p.m. OK Java 11 TESTS 43 187 23961600
86001394 14visheshjain D July 4, 2020, 6:10 p.m. OK Java 11 TESTS 43 187 23961600
85987734 nthistle D July 4, 2020, 4:50 p.m. OK Java 11 TESTS 43 187 24678400
85971061 sarthakmanna D July 4, 2020, 4:01 p.m. OK Java 11 TESTS 43 187 24985600
85975115 habibulka D July 4, 2020, 4:12 p.m. OK Java 11 TESTS 43 202 23859200
85972449 Apfeloxid D July 4, 2020, 4:05 p.m. OK Java 11 TESTS 43 202 23859200
86012873 chris_11 D July 4, 2020, 10:09 p.m. OK Java 11 TESTS 43 202 23961600
85984507 kelvinc1024 D July 4, 2020, 4:40 p.m. OK Java 11 TESTS 43 202 23961600
85999766 huapito D July 4, 2020, 5:54 p.m. OK Java 8 TESTS 43 109 20377600
86009743 mikhail.mints D July 4, 2020, 8:32 p.m. OK Java 8 TESTS 43 109 20480000
86007812 prem_cse D July 4, 2020, 7:51 p.m. OK Java 8 TESTS 43 109 20480000
85968102 ontobrussels D July 4, 2020, 3:53 p.m. OK Java 8 TESTS 43 109 20582400
85983653 mwen D July 4, 2020, 4:38 p.m. OK Java 8 TESTS 43 124 20377600
86009526 Kzstar_17 D July 4, 2020, 8:27 p.m. OK Java 8 TESTS 43 124 20377600
86002652 huapito D July 4, 2020, 6:25 p.m. OK Java 8 TESTS 43 124 20377600
86001279 gawsfbet D July 4, 2020, 6:09 p.m. OK Java 8 TESTS 43 124 20377600
85998828 godxpunk D July 4, 2020, 5:48 p.m. OK Java 8 TESTS 43 124 20377600
85989996 MartyByrde D July 4, 2020, 4:57 p.m. OK Java 8 TESTS 43 124 20377600
86002898 Loremon D July 4, 2020, 6:28 p.m. OK JavaScript TESTS 43 46 7680000
85985067 sylvyrfysh D July 4, 2020, 4:42 p.m. OK Kotlin TESTS 43 140 20582400
85971681 Hakiobo D July 4, 2020, 4:03 p.m. OK Kotlin TESTS 43 155 21606400
85986167 HaKuLess D July 4, 2020, 4:45 p.m. OK Kotlin TESTS 43 156 21606400
85991029 elizarov D July 4, 2020, 5 p.m. OK Kotlin TESTS 43 156 21606400
85985341 batkhuyag D July 4, 2020, 4:43 p.m. OK Kotlin TESTS 43 171 21606400
85993813 Kolyanich D July 4, 2020, 5:07 p.m. OK Mono C# TESTS 43 62 10444800
85969175 EmK D July 4, 2020, 3:56 p.m. OK Mono C# TESTS 43 77 8601600
85982146 mban259 D July 4, 2020, 4:33 p.m. OK Mono C# TESTS 43 77 12390400
85990268 terry_u16 D July 4, 2020, 4:58 p.m. OK Mono C# TESTS 43 93 12595200
85980810 Arnyev D July 4, 2020, 4:29 p.m. OK Mono C# TESTS 43 93 12697600
85964712 Yupiteru D July 4, 2020, 3:45 p.m. OK Mono C# TESTS 43 608 15872000
86008440 lxhgww D July 4, 2020, 8:04 p.m. OK MS C++ TESTS 43 31 3891200
85988032 Goldexperienrce D July 4, 2020, 4:51 p.m. OK MS C++ TESTS 43 31 3891200
85982991 lioshik_ D July 4, 2020, 4:36 p.m. OK MS C++ 2017 TESTS 43 31 3686400
85966753 wp32pw D July 4, 2020, 3:50 p.m. OK MS C++ 2017 TESTS 43 31 3788800
86025739 pjh6792 D July 5, 2020, 5:31 a.m. OK MS C++ 2017 TESTS 43 31 3788800
86013853 P___ D July 4, 2020, 10:50 p.m. OK MS C++ 2017 TESTS 43 31 3788800
86008038 grey D July 4, 2020, 7:56 p.m. OK MS C++ 2017 TESTS 43 31 3788800
86003116 _Ani D July 4, 2020, 6:31 p.m. OK MS C++ 2017 TESTS 43 31 3788800
85974822 vpike D July 4, 2020, 4:11 p.m. OK MS C++ 2017 TESTS 43 31 3788800
85972968 DAle D July 4, 2020, 4:06 p.m. OK MS C++ 2017 TESTS 43 31 3788800
85966794 kim_young_hyun D July 4, 2020, 3:50 p.m. OK MS C++ 2017 TESTS 43 31 3788800
85971020 Pasqual45 D July 4, 2020, 4:01 p.m. OK MS C++ 2017 TESTS 43 31 3993600
85994857 Pyar.Mahobat.Dhoka.Hai D July 4, 2020, 5:10 p.m. OK PyPy 2 TESTS 43 140 25702400
85973520 realnimish D July 4, 2020, 4:08 p.m. OK PyPy 2 TESTS 43 155 24166400
85957557 alexwice D July 4, 2020, 3:30 p.m. OK PyPy 2 TESTS 43 218 31232000
85991048 Gaurav1 D July 4, 2020, 5 p.m. OK PyPy 2 TESTS 43 248 35532800
86017653 Satwik_Tiwari D July 5, 2020, 1:54 a.m. OK PyPy 2 TESTS 43 311 31436800
85992473 aberent D July 4, 2020, 5:04 p.m. OK PyPy 3 TESTS 43 155 21811200
86012684 tycyd D July 4, 2020, 10:01 p.m. OK PyPy 3 TESTS 43 155 22016000
86006473 gintoki_s D July 4, 2020, 7:27 p.m. OK PyPy 3 TESTS 43 156 21913600
86000701 qwertz73355a D July 4, 2020, 6:02 p.m. OK PyPy 3 TESTS 43 156 22323200
85975416 Whatsmyelo D July 4, 2020, 4:13 p.m. OK PyPy 3 TESTS 43 156 23040000
85977845 malylesio D July 4, 2020, 4:20 p.m. OK PyPy 3 TESTS 43 170 22425600
86005871 taoboquan1 D July 4, 2020, 7:16 p.m. OK PyPy 3 TESTS 43 170 23347200
85967173 kclee2172 D July 4, 2020, 3:51 p.m. OK PyPy 3 TESTS 43 170 23347200
85970108 nagiss D July 4, 2020, 3:59 p.m. OK PyPy 3 TESTS 43 171 22118400
85971301 tamato D July 4, 2020, 4:02 p.m. OK PyPy 3 TESTS 43 171 22323200
85974293 Hitikkumar D July 4, 2020, 4:10 p.m. OK Python 2 TESTS 43 171 6553600
86000970 nwi D July 4, 2020, 6:05 p.m. OK Python 2 TESTS 43 233 6553600
85991547 junmiao D July 4, 2020, 5:01 p.m. OK Python 2 TESTS 43 326 6656000
86018492 nandarustam D July 5, 2020, 2:25 a.m. OK Python 2 TESTS 43 405 6656000
86014515 ap1008 D July 4, 2020, 11:20 p.m. OK Python 2 TESTS 43 452 6553600
85979931 kingmoshe D July 4, 2020, 4:26 p.m. OK Python 3 TESTS 43 109 7065600
85991752 konomi D July 4, 2020, 5:02 p.m. OK Python 3 TESTS 43 124 6963200
85970942 mkawa2 D July 4, 2020, 4:01 p.m. OK Python 3 TESTS 43 124 6963200
85961658 sonya123 D July 4, 2020, 3:38 p.m. OK Python 3 TESTS 43 156 7168000
85984566 code_surfer D July 4, 2020, 4:40 p.m. OK Python 3 TESTS 43 186 6963200
86010885 kolli D July 4, 2020, 9:04 p.m. OK Python 3 TESTS 43 202 6963200
85984037 r57shell D July 4, 2020, 4:39 p.m. OK Python 3 TESTS 43 202 6963200
85983325 LHamster D July 4, 2020, 4:37 p.m. OK Python 3 TESTS 43 218 6963200
86020388 Logout D July 5, 2020, 3:21 a.m. OK Python 3 TESTS 43 233 7168000
86011446 localcoder D July 4, 2020, 9:22 p.m. OK Python 3 TESTS 43 249 6963200
86015647 t_uchida D July 5, 2020, 12:19 a.m. OK Rust TESTS 43 31 3788800
85990951 robostac D July 4, 2020, 5 p.m. OK Rust TESTS 43 31 3788800
85972350 sansen D July 4, 2020, 4:05 p.m. OK Rust TESTS 43 31 3788800
85976325 cotton100pc D July 4, 2020, 4:16 p.m. OK Rust TESTS 43 31 3993600
86006634 robostac D July 4, 2020, 7:29 p.m. OK Rust TESTS 43 46 3788800
85983248 pandrei D July 4, 2020, 4:36 p.m. OK Rust TESTS 43 46 3891200
85968417 ichyo D July 4, 2020, 3:54 p.m. OK Rust TESTS 43 46 4403200
86018757 GeoffreyY D July 5, 2020, 2:34 a.m. OK Rust TESTS 43 202 3788800
85999147 fatemender D July 4, 2020, 5:50 p.m. OK Rust TESTS 43 218 3891200
85957483 limed D July 4, 2020, 3:29 p.m. OK Scala TESTS 43 467 39219200

remove filters

Back to search problems