CodeTON Round 8 (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
1942 CodeTON Round 8 (Div. 1 + Div. 2, Rated, Prizes!) FINISHED False 10800 20013899 March 30, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 14000 ) B Bessie and MEX PROGRAMMING constructive algorithms math

B'Farmer John has a permutation p_1, p_2, ldots, p_n , where every integer from 0 to n-1 occurs exactly once. He gives Bessie an array a of length n and challenges her to construct p based on a . The array a is constructed so that a_i = texttt{MEX}(p_1, p_2, ldots, p_i) - p_i , where the texttt{MEX} of an array is the minimum non-negative integer that does not appear in that array. For example, texttt{MEX}(1, 2, 3) = 0 and texttt{MEX}(3, 1, 0) = 2 . Help Bessie construct any valid permutation p that satisfies a . The input is given in such a way that at least one valid p exists. If there are multiple possible p , it is enough to print one of them. The first line contains t ( 1 <= q t <= q 10^4 ) -- the number of test cases. The first line of each test case contains an integer n ( 1 <= q n <= q 2 cdot 10^5 ) -- the lengths of p and a . The second line of each test case contains n integers a_1, a_2, ldots, a_n ( -n <= q a_i <= q n ) -- the elements of array a . It is guaranteed that there is at least one valid p for the given data. It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, output n integers on a new line, the elements of p . If there are multiple solutions, print any of them. In the first case, p = [0, 1, 4, 2, 3] is one possible output. a will then be calculated as a_1 = texttt{MEX}(0) - 0 = 1 , a_2 = texttt{MEX}(0, 1) - 1 = 1 , a_3 = texttt{MEX}(0, 1, 4) - 4 = -2 , a_4 = texttt{MEX}(0, 1, 4, 2) - 2 = 1 , a_5 = texttt{MEX}(0, 1, 4, 2, 3) - 3 = 2 . So, as required, a will be [1, 1, -2, 1, 2] . '...

Tutorials

CodeTON Round 8 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
254207175 karamkontar B March 30, 2024, 7:01 p.m. OK C# 10 TESTS 21 109 43929600
254207717 karamkontar B March 30, 2024, 7:05 p.m. OK C# 10 TESTS 21 140 44134400
254206769 karamkontar B March 30, 2024, 6:57 p.m. OK C# 10 TESTS 21 140 44544000
254208754 loop42 B March 30, 2024, 7:16 p.m. OK C# 10 TESTS 21 670 36966400
254203306 yimuhua B March 30, 2024, 6:31 p.m. OK C++14 (GCC 6-32) TESTS 20 78 2252800
254206590 hatt B March 30, 2024, 6:56 p.m. OK C++14 (GCC 6-32) TESTS 21 92 1638400
254186216 jatindulani31 B March 30, 2024, 4:57 p.m. OK C++14 (GCC 6-32) TESTS 20 92 1638400
254249425 granadierfc B March 31, 2024, 5:49 a.m. OK C++14 (GCC 6-32) TESTS 24 93 1638400
254240306 lapz_ams B March 31, 2024, 3:56 a.m. OK C++14 (GCC 6-32) TESTS 24 93 1638400
254244292 linweiyu1 B March 31, 2024, 4:54 a.m. OK C++14 (GCC 6-32) TESTS 24 93 1843200
254196108 liushengfeng B March 30, 2024, 5:29 p.m. OK C++14 (GCC 6-32) TESTS 20 93 1843200
254248923 Xujj B March 31, 2024, 5:44 a.m. OK C++14 (GCC 6-32) TESTS 24 93 2457600
254192266 Kevin_Fuziheng B March 30, 2024, 5:17 p.m. OK C++14 (GCC 6-32) TESTS 20 93 2457600
254230355 yyxcf B March 31, 2024, 12:52 a.m. OK C++14 (GCC 6-32) TESTS 24 93 3584000
254186032 akms_limon B March 30, 2024, 4:56 p.m. OK C++17 (GCC 7-32) TESTS 20 77 3174400
254189593 Kalu--- B March 30, 2024, 5:08 p.m. OK C++17 (GCC 7-32) TESTS 20 77 4812800
254247395 Shishir_Acharjee B March 31, 2024, 5:28 a.m. OK C++17 (GCC 7-32) TESTS 24 78 1638400
254241845 GGodSSpeed B March 31, 2024, 4:19 a.m. OK C++17 (GCC 7-32) TESTS 24 78 1638400
254209817 beautifullife B March 30, 2024, 7:27 p.m. OK C++17 (GCC 7-32) TESTS 21 78 1638400
254202567 Din_ED B March 30, 2024, 6:27 p.m. OK C++17 (GCC 7-32) TESTS 20 78 1638400
254193822 YouKnowWhoIsBack B March 30, 2024, 5:22 p.m. OK C++17 (GCC 7-32) TESTS 20 78 1638400
254193130 Darshanraj B March 30, 2024, 5:20 p.m. OK C++17 (GCC 7-32) TESTS 20 78 1638400
254190958 NameLess_07 B March 30, 2024, 5:13 p.m. OK C++17 (GCC 7-32) TESTS 20 78 1638400
254243745 Jeffrin2005 B March 31, 2024, 4:47 a.m. OK C++17 (GCC 7-32) TESTS 24 78 1740800
254188705 RomyStiQuE B March 30, 2024, 5:05 p.m. OK C++20 (GCC 13-64) TESTS 20 31 5529600
254243998 stdfloat B March 31, 2024, 4:50 a.m. OK C++20 (GCC 13-64) TESTS 24 46 102400
254237541 LeeMinHoon B March 31, 2024, 3:08 a.m. OK C++20 (GCC 13-64) TESTS 24 46 819200
254224678 marco-vb B March 30, 2024, 10:44 p.m. OK C++20 (GCC 13-64) TESTS 23 46 819200
254247975 msp_008987 B March 31, 2024, 5:34 a.m. OK C++20 (GCC 13-64) TESTS 24 46 1638400
254245021 Maikyou B March 31, 2024, 5:03 a.m. OK C++20 (GCC 13-64) TESTS 24 46 1638400
254241053 SKewFillip B March 31, 2024, 4:07 a.m. OK C++20 (GCC 13-64) TESTS 24 46 1638400
254238392 Saquariu B March 31, 2024, 3:23 a.m. OK C++20 (GCC 13-64) TESTS 24 46 1638400
254235900 yanke B March 31, 2024, 2:40 a.m. OK C++20 (GCC 13-64) TESTS 24 46 1638400
254235899 qmk B March 31, 2024, 2:40 a.m. OK C++20 (GCC 13-64) TESTS 24 46 1638400
254242448 2573246958 B March 31, 2024, 4:28 a.m. OK GNU C11 TESTS 24 889 1843200
254186006 8482_sHubhAm3812 B March 30, 2024, 4:56 p.m. OK GNU C11 TESTS 20 951 1638400
254186311 Ankityadav05 B March 30, 2024, 4:57 p.m. OK GNU C11 TESTS 20 1014 1843200
254216489 Dull B March 30, 2024, 8:39 p.m. OK Go TESTS 21 109 3481600
254216645 Dull B March 30, 2024, 8:41 p.m. OK Go TESTS 21 124 3481600
254188078 treasuryonly B March 30, 2024, 5:03 p.m. OK Haskell TESTS 20 265 15769600
254217984 Enderbrine16 B March 30, 2024, 8:57 p.m. OK Java 21 TESTS 23 373 409600
254185359 rj3377295 B March 30, 2024, 4:54 p.m. OK Java 21 TESTS 20 374 409600
254205225 himneesh9 B March 30, 2024, 6:45 p.m. OK Java 21 TESTS 21 374 512000
254209397 santanu2414 B March 30, 2024, 7:22 p.m. OK Java 21 TESTS 21 389 102400
254224368 vikashgorai985276 B March 30, 2024, 10:38 p.m. OK Java 21 TESTS 23 389 512000
254242846 dzhi B March 31, 2024, 4:34 a.m. OK Java 21 TESTS 24 405 102400
254203196 nazimazhaan17 B March 30, 2024, 6:31 p.m. OK Java 21 TESTS 20 420 409600
254217782 jazzymaxine B March 30, 2024, 8:55 p.m. OK Java 21 TESTS 23 421 204800
254219086 Festyve B March 30, 2024, 9:11 p.m. OK Java 21 TESTS 23 436 307200
254208901 r3hab.rs B March 30, 2024, 7:18 p.m. OK Java 21 TESTS 21 576 34508800
254227381 KaiboHuang B March 30, 2024, 11:46 p.m. OK Java 8 TESTS 24 249 14643200
254236203 faresbadr316 B March 31, 2024, 2:45 a.m. OK Java 8 TESTS 24 280 17920000
254240097 nis1234 B March 31, 2024, 3:52 a.m. OK Java 8 TESTS 24 374 0
254212449 Meghnath_IJ B March 30, 2024, 7:54 p.m. OK Java 8 TESTS 21 763 8089600
254217415 Sumitsingh7 B March 30, 2024, 8:50 p.m. OK Java 8 TESTS 23 810 8089600
254239479 harrypotter1234hogwarts B March 31, 2024, 3:41 a.m. OK Java 8 TESTS 24 873 2867200
254235364 hanekaeru B March 31, 2024, 2:30 a.m. OK Java 8 TESTS 24 1013 0
254188658 Jay_kishan B March 30, 2024, 5:05 p.m. OK Java 8 TESTS 20 1013 0
254232122 CodeMasterGuru B March 31, 2024, 1:31 a.m. OK Java 8 TESTS 24 1029 0
254217991 chaitanya1023 B March 30, 2024, 8:57 p.m. OK Java 8 TESTS 23 1029 0
254242110 wangchaohui B March 31, 2024, 4:23 a.m. OK Kotlin 1.9 TESTS 24 327 13209600
254217509 nealzane B March 30, 2024, 8:52 p.m. OK PyPy 3 TESTS 23 452 25907200
254192408 chalaolani B March 30, 2024, 5:17 p.m. OK PyPy 3 TESTS 20 529 18841600
254203512 RobinFromTheHood B March 30, 2024, 6:33 p.m. OK PyPy 3-64 TESTS 20 155 26624000
254193149 34z12000 B March 30, 2024, 5:20 p.m. OK PyPy 3-64 TESTS 20 170 26624000
254202860 _twi_nami B March 30, 2024, 6:28 p.m. OK PyPy 3-64 TESTS 20 171 21811200
254223794 NitroSpear B March 30, 2024, 10:27 p.m. OK PyPy 3-64 TESTS 23 171 29184000
254216503 gardengnome B March 30, 2024, 8:39 p.m. OK PyPy 3-64 TESTS 21 186 26624000
254235204 voicon B March 31, 2024, 2:27 a.m. OK PyPy 3-64 TESTS 24 186 28979200
254242467 gardengnome B March 31, 2024, 4:28 a.m. OK PyPy 3-64 TESTS 24 187 26624000
254189521 randombernie B March 30, 2024, 5:08 p.m. OK PyPy 3-64 TESTS 20 202 41267200
254211111 sorcerer_21 B March 30, 2024, 7:40 p.m. OK PyPy 3-64 TESTS 21 217 33689600
254206547 jvatsal0709 B March 30, 2024, 6:56 p.m. OK PyPy 3-64 TESTS 21 218 29491200
254203203 OLOGY B March 30, 2024, 6:31 p.m. OK Python 2 TESTS 20 218 17203200
254197173 rawaditya2711 B March 30, 2024, 5:32 p.m. OK Python 3 TESTS 20 280 36454400
254185165 mikhail_mrikh B March 30, 2024, 4:54 p.m. OK Python 3 TESTS 20 327 27238400
254202083 Ice_Bear B March 30, 2024, 6:24 p.m. OK Python 3 TESTS 20 358 27340800
254185450 Codness50 B March 30, 2024, 4:55 p.m. OK Python 3 TESTS 20 358 27340800
254210661 Slata B March 30, 2024, 7:35 p.m. OK Python 3 TESTS 21 373 27955200
254210620 Slata B March 30, 2024, 7:35 p.m. OK Python 3 TESTS 21 389 27340800
254242567 KrishBhimani B March 31, 2024, 4:30 a.m. OK Python 3 TESTS 24 389 27955200
254209939 Slata B March 30, 2024, 7:28 p.m. OK Python 3 TESTS 21 389 27955200
254193811 Sibtain_1 B March 30, 2024, 5:22 p.m. OK Python 3 TESTS 20 389 27955200
254203534 daveshub B March 30, 2024, 6:33 p.m. OK Python 3 TESTS 20 389 35328000
254204891 vstiff B March 30, 2024, 6:42 p.m. OK Rust 2021 TESTS 20 46 13619200

remove filters

Back to search problems