CodeTON Round 1 (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
1656 CodeTON Round 1 (Div. 1 + Div. 2, Rated, Prizes!) FINISHED False 7200 83690699 March 24, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 19698 ) A Good Pairs PROGRAMMING constructive algorithms math sortings

B'You are given an array a_1, a_2, ldots, a_n of positive integers. A good pair is a pair of indices (i, j) with 1 <= q i, j <= q n such that, for all 1 <= q k <= q n , the following equality holds: |a_i - a_k| + |a_k - a_j| = |a_i - a_j|, where |x| denotes the absolute value of x . Find a good pair. Note that i can be equal to j . The input consists of multiple test cases. The first line contains a single integer t ( 1 <= q t <= q 1000 ) -- the number of test cases. Description of the test cases follows. The first line of each test case contains an integer n ( 1 <= q n <= q 10^5 ) -- the length of the array. The second line of each test case contains n integers a_1, a_2, ldots, a_n ( 1 <= q a_i <= q 10^9 ) where a_i is the i -th element of the array. The sum of n for all test cases is at most 2 cdot 10^5 . For each test case, print a single line with two space-separated indices i and j which form a good pair of the array. The case i=j is allowed. It can be shown that such a pair always exists. If there are multiple good pairs, print any of them. In the first case, for i = 2 and j = 3 the equality holds true for all k : '...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
150846391 Sarkar_007 A March 25, 2022, 4:02 a.m. OK Clang++17 Diagnostics TESTS 4 873 409600
150812943 NenadDapic A March 24, 2022, 5:45 p.m. OK FPC TESTS 4 46 409600
150837974 d19amine A March 25, 2022, 12:49 a.m. OK GNU C11 TESTS 4 30 1638400
150838485 KCX A March 25, 2022, 1:05 a.m. OK GNU C11 TESTS 4 31 0
150852306 Tyrus A March 25, 2022, 5:37 a.m. OK GNU C11 TESTS 4 31 409600
150831762 __TheKing A March 24, 2022, 9:45 p.m. OK GNU C11 TESTS 4 31 409600
150853821 yqj_1234 A March 25, 2022, 5:57 a.m. OK GNU C++14 TESTS 4 15 921600
150808192 aman_mnnit2021 A March 24, 2022, 5:16 p.m. OK GNU C++14 TESTS 4 31 0
150842810 HLJU_21_FPG A March 25, 2022, 2:48 a.m. OK GNU C++14 TESTS 4 31 102400
150839241 Vinayak-14 A March 25, 2022, 1:23 a.m. OK GNU C++14 TESTS 4 31 409600
150834664 luogu_bot4 A March 24, 2022, 11:07 p.m. OK GNU C++14 TESTS 4 31 409600
150823826 karanjayswal353 A March 24, 2022, 7:27 p.m. OK GNU C++14 TESTS 4 31 409600
150847767 raunak_321 A March 25, 2022, 4:28 a.m. OK GNU C++14 TESTS 4 31 409600
150845574 _itachi_02 A March 25, 2022, 3:45 a.m. OK GNU C++14 TESTS 4 31 409600
150843572 sjxcxz A March 25, 2022, 3:05 a.m. OK GNU C++14 TESTS 4 31 409600
150848154 yuhyuhy A March 25, 2022, 4:33 a.m. OK GNU C++14 TESTS 4 31 409600
150810562 sahilsr20 A March 24, 2022, 5:29 p.m. OK GNU C++17 TESTS 4 30 409600
150813930 T--o_o--T A March 24, 2022, 5:52 p.m. OK GNU C++17 TESTS 4 30 819200
150842989 Mallika_ A March 25, 2022, 2:53 a.m. OK GNU C++17 TESTS 4 31 0
150842065 bblyyds A March 25, 2022, 2:31 a.m. OK GNU C++17 TESTS 4 31 0
150841029 Kartikey2001 A March 25, 2022, 2:06 a.m. OK GNU C++17 TESTS 4 31 0
150839418 kmyiu A March 25, 2022, 1:28 a.m. OK GNU C++17 TESTS 4 31 0
150846185 subhasisgomes.007 A March 25, 2022, 3:58 a.m. OK GNU C++17 TESTS 4 31 0
150843305 Owaiter A March 25, 2022, 2:59 a.m. OK GNU C++17 TESTS 4 31 0
150851044 JerryBlack A March 25, 2022, 5:19 a.m. OK GNU C++17 TESTS 4 31 0
150847429 karde_yaar A March 25, 2022, 4:22 a.m. OK GNU C++17 TESTS 4 31 0
150821046 lightseba A March 24, 2022, 6:56 p.m. OK GNU C++17 (64) TESTS 4 15 409600
150818367 atanughosh01 A March 24, 2022, 6:30 p.m. OK GNU C++17 (64) TESTS 4 15 409600
150836453 PurpleCrayon A March 25, 2022, 12:06 a.m. OK GNU C++17 (64) TESTS 4 15 409600
150852722 spartanes A March 25, 2022, 5:43 a.m. OK GNU C++17 (64) TESTS 4 15 819200
150844547 RK_little A March 25, 2022, 3:24 a.m. OK GNU C++17 (64) TESTS 4 15 819200
150824942 pradeep A March 24, 2022, 7:41 p.m. OK GNU C++17 (64) TESTS 4 15 819200
150848111 shirley_ A March 25, 2022, 4:33 a.m. OK GNU C++17 (64) TESTS 4 15 4198400
150849058 s1062217 A March 25, 2022, 4:49 a.m. OK GNU C++17 (64) TESTS 4 30 0
150816087 Survivor49 A March 24, 2022, 6:10 p.m. OK GNU C++17 (64) TESTS 4 30 614400
150842063 _jinay_09 A March 25, 2022, 2:31 a.m. OK GNU C++17 (64) TESTS 4 30 819200
150840629 ZIENxc A March 25, 2022, 1:58 a.m. OK GNU C++20 (64) TESTS 4 0 819200
150839968 CSU-Yuuki A March 25, 2022, 1:42 a.m. OK GNU C++20 (64) TESTS 4 15 0
150838173 Story1419 A March 25, 2022, 12:55 a.m. OK GNU C++20 (64) TESTS 4 15 0
150821297 nizamoff A March 24, 2022, 6:59 p.m. OK GNU C++20 (64) TESTS 4 15 0
150817953 silentcoder6318 A March 24, 2022, 6:26 p.m. OK GNU C++20 (64) TESTS 4 15 0
150813161 Abdelmohaymn A March 24, 2022, 5:47 p.m. OK GNU C++20 (64) TESTS 4 15 0
150851472 _ifahim1000_ A March 25, 2022, 5:25 a.m. OK GNU C++20 (64) TESTS 4 15 0
150845692 krishitaliya11 A March 25, 2022, 3:48 a.m. OK GNU C++20 (64) TESTS 4 15 0
150842879 Edwardboss A March 25, 2022, 2:50 a.m. OK GNU C++20 (64) TESTS 4 15 0
150841859 Atangyl A March 25, 2022, 2:26 a.m. OK GNU C++20 (64) TESTS 4 15 0
150843133 not_good_enough_yet A March 25, 2022, 2:55 a.m. OK Go TESTS 4 109 2764800
150847432 kocoler A March 25, 2022, 4:22 a.m. OK Go TESTS 4 124 2867200
150829731 Pengwyn A March 24, 2022, 8:59 p.m. OK Haskell TESTS 4 592 33587200
150844860 IcantSeeCsharp A March 25, 2022, 3:30 a.m. OK Java 11 TESTS 4 187 0
150835086 Sandy_coder2001 A March 24, 2022, 11:22 p.m. OK Java 11 TESTS 4 187 0
150841711 MoonCoder1234 A March 25, 2022, 2:23 a.m. OK Java 11 TESTS 4 202 0
150852822 SaberXpro A March 25, 2022, 5:44 a.m. OK Java 11 TESTS 4 202 0
150845559 the_unseen A March 25, 2022, 3:45 a.m. OK Java 11 TESTS 4 202 0
150831128 zscscsdcd A March 24, 2022, 9:30 p.m. OK Java 11 TESTS 4 202 0
150823644 Ragaa A March 24, 2022, 7:25 p.m. OK Java 11 TESTS 4 202 0
150814937 dhruvil_01 A March 24, 2022, 6 p.m. OK Java 11 TESTS 4 202 0
150810564 flyroko A March 24, 2022, 5:30 p.m. OK Java 11 TESTS 4 202 0
150819164 samitdas03 A March 24, 2022, 6:38 p.m. OK Java 11 TESTS 4 217 0
150850947 Main.Thread A March 25, 2022, 5:18 a.m. OK Java 8 TESTS 4 93 0
150809277 abdoad941 A March 24, 2022, 5:22 p.m. OK Java 8 TESTS 4 108 0
150847969 tanishq044 A March 25, 2022, 4:31 a.m. OK Java 8 TESTS 4 124 0
150830705 feras._.abohasan A March 24, 2022, 9:20 p.m. OK Java 8 TESTS 4 124 0
150822594 CrinklyGolem A March 24, 2022, 7:13 p.m. OK Java 8 TESTS 4 124 0
150815021 VishuTomar A March 24, 2022, 6:01 p.m. OK Java 8 TESTS 4 124 0
150847867 prakhar_30 A March 25, 2022, 4:29 a.m. OK Java 8 TESTS 4 140 0
150800125 poweright A March 24, 2022, 4:28 p.m. OK Java 8 TESTS 4 155 0
150838889 _snowballsenpai A March 25, 2022, 1:15 a.m. OK Java 8 TESTS 4 155 10342400
150845146 mason_24 A March 25, 2022, 3:36 a.m. OK Java 8 TESTS 4 295 0
150853767 Karakurik A March 25, 2022, 5:56 a.m. OK Kotlin 1.5 TESTS 4 218 716800
150835458 F_Rio A March 24, 2022, 11:35 p.m. OK MS C++ 2017 TESTS 4 31 409600
150799184 kjht A March 24, 2022, 4:26 p.m. OK MS C++ 2017 TESTS 4 46 0
150821604 FflashkingF A March 24, 2022, 7:03 p.m. OK MS C++ 2017 TESTS 4 124 409600
150821639 FflashkingF A March 24, 2022, 7:03 p.m. OK MS C++ 2017 TESTS 4 140 409600
150819900 FflashkingF A March 24, 2022, 6:45 p.m. OK MS C++ 2017 TESTS 4 156 409600
150828689 1_2_3_4_5_9 A March 24, 2022, 8:39 p.m. OK PyPy 2 TESTS 4 93 10854400
150852605 vulpine A March 25, 2022, 5:41 a.m. OK PyPy 3 TESTS 4 202 10854400
150808534 YashNandwana A March 24, 2022, 5:18 p.m. OK PyPy 3 TESTS 4 202 10956800
150843183 abcd1234dd51 A March 25, 2022, 2:56 a.m. OK PyPy 3 TESTS 4 202 14540800
150825089 Mannu31 A March 24, 2022, 7:43 p.m. OK PyPy 3 TESTS 4 217 10649600
150809365 Pythonic__Python A March 24, 2022, 5:23 p.m. OK PyPy 3 TESTS 4 217 10854400
150818607 sigilius A March 24, 2022, 6:32 p.m. OK PyPy 3 TESTS 4 218 10752000
150816171 erudition_0705 A March 24, 2022, 6:11 p.m. OK PyPy 3 TESTS 4 218 10956800
150817302 dima98657 A March 24, 2022, 6:20 p.m. OK PyPy 3 TESTS 4 233 15769600
150837474 crapcode A March 25, 2022, 12:35 a.m. OK PyPy 3 TESTS 4 405 13721600
150848848 sakshatmali A March 25, 2022, 4:45 a.m. OK PyPy 3-64 TESTS 4 108 15052800
150839401 NKUCristiano A March 25, 2022, 1:27 a.m. OK PyPy 3-64 TESTS 4 108 15974400
150839307 NKUCristiano A March 25, 2022, 1:25 a.m. OK PyPy 3-64 TESTS 4 124 19660800
150813226 Abatur A March 24, 2022, 5:47 p.m. OK PyPy 3-64 TESTS 4 156 17203200
150840705 Abdul_Malik A March 25, 2022, 2 a.m. OK PyPy 3-64 TESTS 4 171 13414400
150843442 Mujahid.Haider A March 25, 2022, 3:02 a.m. OK PyPy 3-64 TESTS 4 171 13516800
150816985 Shinigami_03 A March 24, 2022, 6:18 p.m. OK PyPy 3-64 TESTS 4 171 13516800
150828544 CaptainUknown A March 24, 2022, 8:37 p.m. OK PyPy 3-64 TESTS 4 171 15257600
150839150 Youarenotgood A March 25, 2022, 1:22 a.m. OK PyPy 3-64 TESTS 4 171 15360000
150835829 SalatL A March 24, 2022, 11:45 p.m. OK PyPy 3-64 TESTS 4 171 16691200
150810977 Quinsie A March 24, 2022, 5:32 p.m. OK Python 3 TESTS 4 62 7372800
150816553 nitanshritul A March 24, 2022, 6:14 p.m. OK Python 3 TESTS 4 77 7372800
150811616 Abhay_-_-_-kumar A March 24, 2022, 5:36 p.m. OK Python 3 TESTS 4 77 7372800
150823858 rr745 A March 24, 2022, 7:28 p.m. OK Python 3 TESTS 4 78 7065600
150840378 Zaryab_Ajmal A March 25, 2022, 1:52 a.m. OK Python 3 TESTS 4 78 7372800
150830116 michaleproff A March 24, 2022, 9:07 p.m. OK Python 3 TESTS 4 78 7372800
150822301 a_j_r_uttam A March 24, 2022, 7:10 p.m. OK Python 3 TESTS 4 78 7372800
150810532 varvara_ershova A March 24, 2022, 5:29 p.m. OK Python 3 TESTS 4 78 7372800
150808506 lucifer_delco A March 24, 2022, 5:18 p.m. OK Python 3 TESTS 4 78 7372800
150846163 _th A March 25, 2022, 3:57 a.m. OK Python 3 TESTS 4 93 7372800
150816605 Hyrulia A March 24, 2022, 6:14 p.m. OK Rust 2021 TESTS 4 15 2252800

remove filters

Back to search problems