CodeTON Round 4 (Div. 1 + Div. 2, Rated, Prizes!)

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
1810 CodeTON Round 4 (Div. 1 + Div. 2, Rated, Prizes!) FINISHED False 7200 56993062 March 31, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 14919 ) C Make It Permutation PROGRAMMING brute force greedy sortings

B"You have an integer array a of length n . There are two kinds of operations you can make. You want to make the final array a permutation of any positive length. Please output the minimum cost of doing that. Note that you can make the array empty during the operations, but the final array must contain at least one integer. A permutation of length n is an array consisting of n distinct integers from 1 to n in arbitrary order. For example, [2,3,1,5,4] is a permutation, but [1,2,2] is not a permutation ( 2 appears twice in the array), and [1,3,4] is also not a permutation ( n=3 but there is 4 in the array). Each test contains multiple test cases. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Their description follows. The first line of each test case contains three integers n , c , d ( 1 <= n <= 10^5 , 1 <= c,d <= 10^9 ). The second line of each test case contains n integers a_{1}, a_{2}, ldots, a_{n} ( 1 <= a_{i} <= 10^9 ). It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, output in one line the minimum cost to make the final array a permutation. In the first test case, the array is already a permutation, so there's no need for operations. In the second test case, we can remove numbers 5 , 6 to get the permutation [1,2,3] in cost 2 . Note that we can also get a permutation by inserting a number 4 , but it costs 5 . In the third test case, we can just remove all the numbers except for the first number 1 . It costs 8 , and the final array is [1] , which is a permutation of length 1 . In the fourth test case, we can remove all the numbers except for 2 , and insert a number 1 to the first position. It costs 4+10=14 , and the final array is [1,2] , which "...

Tutorials

Editorial of CodeTON Round 4 (Div. 1 + Div. 2, Rated, Prizes!)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
200064440 Jaswanth_1999 C April 1, 2023, 2:28 a.m. OK Clang++17 Diagnostics TESTS 15 202 0
200069094 Smallorange C April 1, 2023, 3:47 a.m. OK GNU C11 TESTS 15 78 819200
200059895 1435730 C April 1, 2023, 12:50 a.m. OK GNU C11 TESTS 15 109 1228800
200023134 ScottSuperb C March 31, 2023, 5:09 p.m. OK GNU C++14 TESTS 15 31 3276800
200060352 Aria_Math C April 1, 2023, 1:02 a.m. OK GNU C++14 TESTS 15 62 409600
200063211 JZWJZWJZW C April 1, 2023, 2:06 a.m. OK GNU C++14 TESTS 15 62 1126400
200060596 huangkx C April 1, 2023, 1:08 a.m. OK GNU C++14 TESTS 15 62 1638400
200078094 wust-zzl C April 1, 2023, 5:42 a.m. OK GNU C++14 TESTS 15 77 409600
200029693 Bojji_Kage C March 31, 2023, 5:52 p.m. OK GNU C++14 TESTS 15 77 819200
200039456 Pinoko C March 31, 2023, 7:29 p.m. OK GNU C++14 TESTS 15 77 819200
200060083 mzycNATO C April 1, 2023, 12:55 a.m. OK GNU C++14 TESTS 15 77 819200
200063109 JZWJZWJZW C April 1, 2023, 2:04 a.m. OK GNU C++14 TESTS 15 77 1638400
200072625 sujal3011 C April 1, 2023, 4:37 a.m. OK GNU C++14 TESTS 15 77 2457600
200066529 hnust_wanjiawen C April 1, 2023, 3:05 a.m. OK GNU C++17 TESTS 15 62 409600
200039878 maverick_2003 C March 31, 2023, 7:33 p.m. OK GNU C++17 TESTS 15 62 409600
200032181 OgradL C March 31, 2023, 6:14 p.m. OK GNU C++17 TESTS 15 62 409600
200071148 yogendrabaghel C April 1, 2023, 4:17 a.m. OK GNU C++17 TESTS 15 62 409600
200067376 Akai_Shuuichi C April 1, 2023, 3:19 a.m. OK GNU C++17 TESTS 15 62 409600
200024017 gsomani C March 31, 2023, 5:13 p.m. OK GNU C++17 TESTS 15 62 819200
200024494 TimDSF C March 31, 2023, 5:16 p.m. OK GNU C++17 TESTS 15 62 819200
200064064 svandich C April 1, 2023, 2:22 a.m. OK GNU C++17 TESTS 15 62 1536000
200035522 jahid_hridoy C March 31, 2023, 6:45 p.m. OK GNU C++17 TESTS 15 62 2048000
200076640 pcajourney C April 1, 2023, 5:26 a.m. OK GNU C++17 TESTS 15 77 409600
200059585 fakhoury C April 1, 2023, 12:40 a.m. OK GNU C++17 (64) TESTS 15 46 409600
200036002 CrazyCoder00 C March 31, 2023, 6:50 p.m. OK GNU C++17 (64) TESTS 15 46 409600
200070322 Once_I_Liked_AGirl C April 1, 2023, 4:06 a.m. OK GNU C++17 (64) TESTS 15 46 819200
200074155 sm745052 C April 1, 2023, 4:56 a.m. OK GNU C++17 (64) TESTS 15 46 819200
200071792 y_combinator C April 1, 2023, 4:27 a.m. OK GNU C++17 (64) TESTS 15 46 819200
200037776 serialcomder C March 31, 2023, 7:10 p.m. OK GNU C++17 (64) TESTS 15 46 1638400
200036109 rtckyw_ C March 31, 2023, 6:51 p.m. OK GNU C++17 (64) TESTS 15 46 2457600
200064872 x0r C April 1, 2023, 2:36 a.m. OK GNU C++17 (64) TESTS 15 46 2457600
200022657 Ved_Patel C March 31, 2023, 5:07 p.m. OK GNU C++17 (64) TESTS 15 46 2969600
200028262 colommar C March 31, 2023, 5:40 p.m. OK GNU C++17 (64) TESTS 15 61 819200
200035186 eucalyptus C March 31, 2023, 6:42 p.m. OK GNU C++20 (64) TESTS 15 31 819200
200056277 kinnshuuu C March 31, 2023, 11:15 p.m. OK GNU C++20 (64) TESTS 15 31 819200
200052242 AK2000YY C March 31, 2023, 9:51 p.m. OK GNU C++20 (64) TESTS 15 31 1126400
200055584 kausar_ahamed C March 31, 2023, 10:56 p.m. OK GNU C++20 (64) TESTS 15 31 2662400
200036753 shadow_sami C March 31, 2023, 6:58 p.m. OK GNU C++20 (64) TESTS 15 31 3481600
200028725 DongDuiYu C March 31, 2023, 5:44 p.m. OK GNU C++20 (64) TESTS 15 31 6144000
200072160 dianhsu_scarlet C April 1, 2023, 4:32 a.m. OK GNU C++20 (64) TESTS 15 46 409600
200074182 Nathan4 C April 1, 2023, 4:56 a.m. OK GNU C++20 (64) TESTS 15 46 409600
200073613 yaufung C April 1, 2023, 4:50 a.m. OK GNU C++20 (64) TESTS 15 46 409600
200065267 Lavine C April 1, 2023, 2:44 a.m. OK GNU C++20 (64) TESTS 15 46 409600
200038291 kuan525 C March 31, 2023, 7:16 p.m. OK Go TESTS 15 171 10547200
200032488 yeroc C March 31, 2023, 6:17 p.m. OK Java 11 TESTS 15 218 0
200046666 ETHANHUNTMI5 C March 31, 2023, 8:45 p.m. OK Java 11 TESTS 15 280 0
200075611 Vaibhav_Rajpal C April 1, 2023, 5:14 a.m. OK Java 11 TESTS 15 358 4915200
200027055 the_half_blood_prince C March 31, 2023, 5:31 p.m. OK Java 11 TESTS 15 358 5120000
200079287 imvivekthakur C April 1, 2023, 5:55 a.m. OK Java 11 TESTS 15 373 7782400
200064305 optimus1369 C April 1, 2023, 2:26 a.m. OK Java 11 TESTS 15 373 7782400
200031534 vijender_8601 C March 31, 2023, 6:08 p.m. OK Java 11 TESTS 15 374 8806400
200023076 kasiru_69 C March 31, 2023, 5:09 p.m. OK Java 11 TESTS 15 389 2764800
200077191 XIN C April 1, 2023, 5:32 a.m. OK Java 11 TESTS 15 389 3174400
200075143 bleach__ C April 1, 2023, 5:08 a.m. OK Java 11 TESTS 15 404 10649600
200021853 egor4444ik C March 31, 2023, 5:04 p.m. OK Java 17 TESTS 15 264 102400
200070843 cnlonces C April 1, 2023, 4:13 a.m. OK Java 17 TESTS 15 280 1945600
200066827 cnlonces C April 1, 2023, 3:10 a.m. OK Java 17 TESTS 15 295 2048000
200066992 iklop C April 1, 2023, 3:13 a.m. OK Java 17 TESTS 15 451 12390400
200031357 merlin_ C March 31, 2023, 6:06 p.m. OK Java 17 TESTS 15 530 14848000
200030239 meteoLdrago C March 31, 2023, 5:56 p.m. OK Java 17 TESTS 15 592 1536000
200027633 Yousef_Badr C March 31, 2023, 5:35 p.m. OK Java 17 TESTS 15 592 10854400
200034733 yadavDipesh C March 31, 2023, 6:37 p.m. OK Java 8 TESTS 15 155 0
200030219 kamranm C March 31, 2023, 5:56 p.m. OK Java 8 TESTS 15 170 0
200032316 kamranm C March 31, 2023, 6:15 p.m. OK Java 8 TESTS 15 217 205721600
200037843 NerfThis C March 31, 2023, 7:10 p.m. OK Java 8 TESTS 15 218 0
200031945 kamranm C March 31, 2023, 6:12 p.m. OK Java 8 TESTS 15 233 20377600
200037912 NerfThis C March 31, 2023, 7:11 p.m. OK Java 8 TESTS 15 248 0
200058891 GlockGod C April 1, 2023, 12:21 a.m. OK Java 8 TESTS 15 264 5017600
200024636 priyaroy3370 C March 31, 2023, 5:16 p.m. OK Java 8 TESTS 15 280 11059200
200079674 depurador_ik C April 1, 2023, 5:59 a.m. OK Java 8 TESTS 15 296 64102400
200075751 amit_roy C April 1, 2023, 5:16 a.m. OK Java 8 TESTS 15 311 11161600
200038575 pavlo.liapota C March 31, 2023, 7:19 p.m. OK Kotlin 1.7 TESTS 15 936 125337600
200035668 pavlo.liapota C March 31, 2023, 6:47 p.m. OK Kotlin 1.7 TESTS 15 982 105881600
200025466 EbuYandex C March 31, 2023, 5:21 p.m. OK MS C++ 2017 TESTS 15 295 6860800
200017476 n0cturnal C March 31, 2023, 4:31 p.m. OK MS C++ 2017 TESTS 15 327 5939200
200069808 1434314294 C April 1, 2023, 3:58 a.m. OK MS C++ 2017 TESTS 15 826 10137600
200079607 satyajeetdas045 C April 1, 2023, 5:58 a.m. OK PyPy 2 TESTS 15 311 16384000
200071129 jinzew C April 1, 2023, 4:17 a.m. OK PyPy 3 TESTS 15 311 16384000
200032490 torqueaj C March 31, 2023, 6:17 p.m. OK PyPy 3 TESTS 15 405 12902400
200054917 bpdolson C March 31, 2023, 10:42 p.m. OK PyPy 3 TESTS 15 639 14233600
200035290 ankitesh C March 31, 2023, 6:43 p.m. OK PyPy 3-64 TESTS 15 140 22630400
200045757 gardengnome C March 31, 2023, 8:38 p.m. OK PyPy 3-64 TESTS 15 155 16281600
200071005 Youarenotgood C April 1, 2023, 4:15 a.m. OK PyPy 3-64 TESTS 15 155 21913600
200029572 blue_ice_yj C March 31, 2023, 5:51 p.m. OK PyPy 3-64 TESTS 15 155 24576000
200021243 C01V3RT C March 31, 2023, 5:02 p.m. OK PyPy 3-64 TESTS 15 155 24883200
200039491 isekun C March 31, 2023, 7:29 p.m. OK PyPy 3-64 TESTS 15 170 17510400
200018990 aniketabhiraj2004 C March 31, 2023, 4:34 p.m. OK PyPy 3-64 TESTS 15 171 19456000
200070953 Youarenotgood C April 1, 2023, 4:15 a.m. OK PyPy 3-64 TESTS 15 171 22016000
200070507 The_MazeRunner C April 1, 2023, 4:08 a.m. OK PyPy 3-64 TESTS 15 171 23859200
200075756 nealzane C April 1, 2023, 5:16 a.m. OK PyPy 3-64 TESTS 15 171 24678400
200061216 eugalt C April 1, 2023, 1:23 a.m. OK Python 3 TESTS 15 296 14028800
200038455 Antonio_Colapso_07 C March 31, 2023, 7:17 p.m. OK Python 3 TESTS 15 311 14028800
200025226 eugalt C March 31, 2023, 5:20 p.m. OK Python 3 TESTS 15 311 14028800
200023188 eugalt C March 31, 2023, 5:09 p.m. OK Python 3 TESTS 15 326 13926400
200017916 SauravTheChamp C March 31, 2023, 4:32 p.m. OK Python 3 TESTS 15 327 10444800
200041564 MohmadZaid._. C March 31, 2023, 7:53 p.m. OK Python 3 TESTS 15 358 8396800
200032190 PythonIsGodlike C March 31, 2023, 6:14 p.m. OK Python 3 TESTS 15 373 13619200
200028299 SBAGE C March 31, 2023, 5:41 p.m. OK Python 3 TESTS 15 373 143360000
200077138 AKXYN C April 1, 2023, 5:32 a.m. OK Python 3 TESTS 15 389 10547200
200022969 oyefish C March 31, 2023, 5:08 p.m. OK Python 3 TESTS 15 389 12185600
200060434 drdilyor C April 1, 2023, 1:04 a.m. OK Rust 2021 TESTS 15 31 1638400
200030323 error1000 C March 31, 2023, 5:57 p.m. OK Rust 2021 TESTS 15 109 3788800
200032242 error1000 C March 31, 2023, 6:15 p.m. OK Rust 2021 TESTS 15 124 3788800

remove filters

Back to search problems