Codeforces Round 784 (Div. 4)

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
1669 Codeforces Round 784 (Div. 4) FINISHED False 7200 86628263 April 21, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 45533 ) B Triple PROGRAMMING implementation sortings 800

B"Given an array a of n elements, print any value that appears at least three times or print -1 if there is no such value. The first line contains an integer 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 cdot10^5 ) -- the length of the array. The second line of each test case contains n integers a_1, a_2, ... , a_n ( 1 <= q a_i <= q n ) -- the elements of the array. It is guaranteed that the sum of n over all test cases does not exceed 2 cdot10^5 . For each test case, print any value that appears at least three times or print -1 if there is no such value. In the first test case there is just a single element, so it can't occur at least three times and the answer is -1. In the second test case, all three elements of the array are equal to 2 , so 2 occurs three times, and so the answer is 2 . For the third test case, 2 occurs four times, so the answer is 2 . For the fourth test case, 4 occurs three times, so the answer is 4 . For the fifth test case, 1 , 2 and 3 all occur at least three times, so they are all valid outputs. For the sixth test case, all elements are distinct, so none of them occurs at least three times and the answer is -1. "...

Tutorials

102101

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
154666878 Ravi_Anand59 B April 23, 2022, 12:50 p.m. OK Clang++17 Diagnostics TESTS 44 919 1024000 800
154787904 triedbest B April 23, 2022, 8:31 p.m. OK GNU C11 TESTS 44 78 819200 800
154813987 cainiaoqifei B April 24, 2022, 6:05 a.m. OK GNU C11 TESTS 44 78 819200 800
154823064 bkifhr10 B April 24, 2022, 7:49 a.m. OK GNU C11 TESTS 45 78 8089600 800
154840305 codingjunk B April 24, 2022, 11:05 a.m. OK GNU C11 TESTS 45 93 819200 800
154753566 predawn B April 23, 2022, 3:58 p.m. OK GNU C11 TESTS 44 93 1638400 800
154790795 silvioeduardosb B April 23, 2022, 9:24 p.m. OK GNU C11 TESTS 44 139 1638400 800
154865916 TesNik008 B April 24, 2022, 3:07 p.m. OK GNU C11 TESTS 45 280 1638400 800
154848995 Telescoping B April 24, 2022, 12:17 p.m. OK GNU C11 TESTS 45 280 1638400 800
154647931 P4726pH B April 23, 2022, 10:58 a.m. OK GNU C11 TESTS 44 951 819200 800
154819617 dhruv_241102 B April 24, 2022, 7:13 a.m. OK GNU C11 TESTS 45 982 1536000 800
154817717 cunzai_zsy0531 B April 24, 2022, 6:53 a.m. OK GNU C++14 TESTS 44 15 3379200 800
154496854 cunzai_zsy0531 B April 22, 2022, 12:32 p.m. OK GNU C++14 TESTS 44 15 3379200 800
154609802 Alizen_ B April 23, 2022, 2:23 a.m. OK GNU C++14 TESTS 44 46 819200 800
154692589 belsedor B April 23, 2022, 1:47 p.m. OK GNU C++14 TESTS 44 46 921600 800
154650677 bkifhr8 B April 23, 2022, 11:29 a.m. OK GNU C++14 TESTS 44 46 1536000 800
154639141 Pawan313 B April 23, 2022, 9:21 a.m. OK GNU C++14 TESTS 44 46 1638400 800
154645593 chenyinming B April 23, 2022, 10:32 a.m. OK GNU C++14 TESTS 44 61 819200 800
154627300 adcarryII B April 23, 2022, 7:03 a.m. OK GNU C++14 TESTS 44 61 1638400 800
154587830 p.ferrari B April 22, 2022, 6:27 p.m. OK GNU C++14 TESTS 44 61 1638400 800
154904138 nothingwrong B April 25, 2022, 4:50 a.m. OK GNU C++14 TESTS 45 62 819200 800
154840839 html_programmer B April 24, 2022, 11:10 a.m. OK GNU C++17 TESTS 45 46 819200 800
154630323 sravanbansal08081998 B April 23, 2022, 7:40 a.m. OK GNU C++17 TESTS 44 46 819200 800
154625044 Orenji.Sora B April 23, 2022, 6:40 a.m. OK GNU C++17 TESTS 44 46 819200 800
154504885 Theremon B April 22, 2022, 1:54 p.m. OK GNU C++17 TESTS 44 46 819200 800
154876677 KaryGauss03 B April 24, 2022, 5:10 p.m. OK GNU C++17 TESTS 45 46 819200 800
154654204 I-Ripple B April 23, 2022, 12:09 p.m. OK GNU C++17 TESTS 44 46 921600 800
154626191 88alchemist88 B April 23, 2022, 6:52 a.m. OK GNU C++17 TESTS 44 46 921600 800
154634822 kinaman B April 23, 2022, 8:36 a.m. OK GNU C++17 TESTS 44 46 921600 800
154614617 abdsfw B April 23, 2022, 4:12 a.m. OK GNU C++17 TESTS 44 46 921600 800
154883945 White_Kitten B April 24, 2022, 7:04 p.m. OK GNU C++17 TESTS 45 46 921600 800
154860109 boxnos B April 24, 2022, 2:04 p.m. OK GNU C++17 (64) TESTS 45 15 1331200 800
154819348 Heisenberg222 B April 24, 2022, 7:10 a.m. OK GNU C++17 (64) TESTS 45 31 716800 800
154602658 S_Neal B April 22, 2022, 10:50 p.m. OK GNU C++17 (64) TESTS 44 31 819200 800
154572088 evage B April 22, 2022, 4:24 p.m. OK GNU C++17 (64) TESTS 44 31 819200 800
154559649 brunomont B April 22, 2022, 3:52 p.m. OK GNU C++17 (64) TESTS 44 31 819200 800
154588021 avicodes B April 22, 2022, 6:29 p.m. OK GNU C++17 (64) TESTS 44 31 819200 800
154585443 fr200110219102 B April 22, 2022, 5:57 p.m. OK GNU C++17 (64) TESTS 44 31 1638400 800
154823421 Ash_Dr B April 24, 2022, 7:53 a.m. OK GNU C++17 (64) TESTS 45 46 819200 800
154897304 TLE. B April 25, 2022, 2:10 a.m. OK GNU C++17 (64) TESTS 45 46 819200 800
154812300 Osazoname B April 24, 2022, 5:44 a.m. OK GNU C++17 (64) TESTS 44 46 819200 800
154587007 nekstas B April 22, 2022, 6:16 p.m. OK GNU C++20 (64) TESTS 44 31 819200 800
154580999 CyberCow B April 22, 2022, 5:06 p.m. OK GNU C++20 (64) TESTS 44 31 819200 800
154593045 rgmhv08 B April 22, 2022, 7:45 p.m. OK GNU C++20 (64) TESTS 44 31 819200 800
154594372 Ceaconne B April 22, 2022, 8:07 p.m. OK GNU C++20 (64) TESTS 44 31 819200 800
154631609 Hamed5001 B April 23, 2022, 7:56 a.m. OK GNU C++20 (64) TESTS 44 31 819200 800
154637079 ShlokG B April 23, 2022, 9 a.m. OK GNU C++20 (64) TESTS 44 31 819200 800
154654880 Wi_Es B April 23, 2022, 12:18 p.m. OK GNU C++20 (64) TESTS 44 31 819200 800
154692867 C0ldSmi1e B April 23, 2022, 1:50 p.m. OK GNU C++20 (64) TESTS 44 31 819200 800
154756468 Matr1X22 B April 23, 2022, 4:08 p.m. OK GNU C++20 (64) TESTS 44 31 819200 800
154862633 AdrianRosu B April 24, 2022, 2:30 p.m. OK GNU C++20 (64) TESTS 45 31 819200 800
154611676 pepradere B April 23, 2022, 3:08 a.m. OK Go TESTS 44 77 5632000 800
154623295 sf14t B April 23, 2022, 6:21 a.m. OK Java 11 TESTS 44 202 0 800
154876527 Vasu1211 B April 24, 2022, 5:07 p.m. OK Java 11 TESTS 45 202 0 800
154536474 its_aks_ulure B April 22, 2022, 3:09 p.m. OK Java 11 TESTS 44 217 0 800
154506366 dhruvil8804 B April 22, 2022, 2:11 p.m. OK Java 11 TESTS 44 217 0 800
154885726 Amir_Coderest B April 24, 2022, 7:37 p.m. OK Java 11 TESTS 45 217 0 800
154613163 gsi34 B April 23, 2022, 3:41 a.m. OK Java 11 TESTS 44 218 0 800
154598784 AndreySiunov B April 22, 2022, 9:15 p.m. OK Java 11 TESTS 44 233 0 800
154599497 calcp262144 B April 22, 2022, 9:28 p.m. OK Java 11 TESTS 44 233 0 800
154638441 LanceTheDragonTrainer B April 23, 2022, 9:14 a.m. OK Java 11 TESTS 44 233 4198400 800
154637059 iamsoumik B April 23, 2022, 9 a.m. OK Java 11 TESTS 44 249 5939200 800
154595192 FirePegasus B April 22, 2022, 8:19 p.m. OK Java 8 TESTS 44 124 1945600 800
154646833 Hivilsm B April 23, 2022, 10:46 a.m. OK Java 8 TESTS 44 124 1945600 800
154657273 AbdelrahmanFathy B April 23, 2022, 12:36 p.m. OK Java 8 TESTS 44 140 78643200 800
154594996 FirePegasus B April 22, 2022, 8:16 p.m. OK Java 8 TESTS 44 155 1945600 800
154623945 -crazy_coder- B April 23, 2022, 6:27 a.m. OK Java 8 TESTS 44 155 13619200 800
154646071 ak_ankit B April 23, 2022, 10:37 a.m. OK Java 8 TESTS 44 170 2560000 800
154735831 DEMO23 B April 23, 2022, 3:08 p.m. OK Java 8 TESTS 44 171 1945600 800
154504448 ahmedTarek28 B April 22, 2022, 1:50 p.m. OK Java 8 TESTS 44 186 2867200 800
154865178 zrouli.aa B April 24, 2022, 2:58 p.m. OK Java 8 TESTS 45 187 0 800
154875577 thirumal18 B April 24, 2022, 4:53 p.m. OK Java 8 TESTS 45 187 0 800
154601057 ryanberg B April 22, 2022, 10:03 p.m. OK Kotlin 1.5 TESTS 44 327 9728000 800
154870966 wbars B April 24, 2022, 3:56 p.m. OK Kotlin 1.5 TESTS 45 763 52633600 800
154808102 pandoomanda B April 24, 2022, 4:40 a.m. OK Kotlin 1.6 TESTS 44 451 15564800 800
154494158 hoxym01a B April 22, 2022, 12:05 p.m. OK Kotlin 1.6 TESTS 44 608 62361600 800
154493007 paparwinthai B April 22, 2022, 11:53 a.m. OK Kotlin 1.6 TESTS 44 654 66457600 800
154637271 wangjunchao B April 23, 2022, 9:02 a.m. OK MS C++ 2017 TESTS 44 124 6451200 800
154499211 RealStarlight B April 22, 2022, 12:55 p.m. OK MS C++ 2017 TESTS 44 140 819200 800
154780556 Gadi B April 23, 2022, 6:38 p.m. OK MS C++ 2017 TESTS 44 140 819200 800
154586218 ShardaKriti1 B April 22, 2022, 6:06 p.m. OK MS C++ 2017 TESTS 44 156 1638400 800
154639580 SofiBorisova B April 23, 2022, 9:26 a.m. OK MS C++ 2017 TESTS 44 171 819200 800
154492908 Shishira B April 22, 2022, 11:52 a.m. OK MS C++ 2017 TESTS 44 186 819200 800
154780475 Gadi B April 23, 2022, 6:37 p.m. OK MS C++ 2017 TESTS 44 186 6758400 800
154904160 drishyavaishya B April 25, 2022, 4:50 a.m. OK MS C++ 2017 TESTS 45 202 819200 800
154593640 slaxim B April 22, 2022, 7:55 p.m. OK MS C++ 2017 TESTS 44 202 1740800 800
154618398 mudit20 B April 23, 2022, 5:18 a.m. OK MS C++ 2017 TESTS 44 218 6758400 800
154705537 Stage1 B April 23, 2022, 2:18 p.m. OK .NET Core C# TESTS 44 156 15257600 800
154645887 edge555 B April 23, 2022, 10:35 a.m. OK .NET Core C# TESTS 44 249 32972800 800
154605732 cod1r B April 23, 2022, 12:36 a.m. OK Ocaml TESTS 44 124 12288000 800
154787643 acorn11 B April 23, 2022, 8:27 p.m. OK PyPy 2 TESTS 44 312 18739200 800
154502119 fkania2 B April 22, 2022, 1:26 p.m. OK PyPy 3 TESTS 44 170 19456000 800
154852338 Andrei_Kuz B April 24, 2022, 12:49 p.m. OK PyPy 3 TESTS 45 186 22425600 800
154502924 fkania2 B April 22, 2022, 1:34 p.m. OK PyPy 3 TESTS 44 187 19456000 800
154627375 seraph14 B April 23, 2022, 7:04 a.m. OK PyPy 3 TESTS 44 233 22528000 800
154618191 akifpathan B April 23, 2022, 5:15 a.m. OK PyPy 3 TESTS 44 264 21708800 800
154661596 Chiho B April 23, 2022, 12:42 p.m. OK PyPy 3 TESTS 44 296 21708800 800
154891864 eosboss B April 24, 2022, 9:35 p.m. OK PyPy 3 TESTS 45 389 20787200 800
154592304 julianferres B April 22, 2022, 7:34 p.m. OK PyPy 3 TESTS 44 390 57856000 800
154592105 julianferres B April 22, 2022, 7:31 p.m. OK PyPy 3 TESTS 44 405 57856000 800
154829768 Amirkan_Zakirov B April 24, 2022, 9 a.m. OK PyPy 3 TESTS 45 436 18227200 800
154799262 Zephyyr B April 24, 2022, 1:16 a.m. OK PyPy 3-64 TESTS 44 109 22220800 800
154543243 wblazej B April 22, 2022, 3:19 p.m. OK PyPy 3-64 TESTS 44 124 21196800 800
154546117 wblazej B April 22, 2022, 3:24 p.m. OK PyPy 3-64 TESTS 44 124 23244800 800
154549620 wblazej B April 22, 2022, 3:31 p.m. OK PyPy 3-64 TESTS 44 124 24064000 800
154548378 wblazej B April 22, 2022, 3:28 p.m. OK PyPy 3-64 TESTS 44 124 24371200 800
154552742 wblazej B April 22, 2022, 3:37 p.m. OK PyPy 3-64 TESTS 44 124 24780800 800
154545740 wblazej B April 22, 2022, 3:24 p.m. OK PyPy 3-64 TESTS 44 139 23756800 800
154549229 wblazej B April 22, 2022, 3:30 p.m. OK PyPy 3-64 TESTS 44 140 29696000 800
154502093 fkania2 B April 22, 2022, 1:26 p.m. OK PyPy 3-64 TESTS 44 155 31027200 800
154536147 wblazej B April 22, 2022, 3:08 p.m. OK PyPy 3-64 TESTS 44 170 31334400 800
154882447 OLOGY B April 24, 2022, 6:37 p.m. OK Python 2 TESTS 45 327 19968000 800
154816649 Ku6iK_Ru6Ika B April 24, 2022, 6:39 a.m. OK Python 3 TESTS 44 171 15667200 800
154804473 voicon B April 24, 2022, 3:25 a.m. OK Python 3 TESTS 44 171 21094400 800
154772540 COUB B April 23, 2022, 5:08 p.m. OK Python 3 TESTS 44 186 13926400 800
154641038 axe98 B April 23, 2022, 9:41 a.m. OK Python 3 TESTS 44 186 15667200 800
154616397 bunny_stew B April 23, 2022, 4:47 a.m. OK Python 3 TESTS 44 186 15974400 800
154503441 andyandy B April 22, 2022, 1:40 p.m. OK Python 3 TESTS 44 187 13926400 800
154495051 KolyanRobocope B April 22, 2022, 12:14 p.m. OK Python 3 TESTS 44 187 15667200 800
154500815 Qwertyuiop99 B April 22, 2022, 1:12 p.m. OK Python 3 TESTS 44 202 10854400 800
154556539 wblazej B April 22, 2022, 3:45 p.m. OK Python 3 TESTS 44 202 11673600 800
154642779 KrisjanisP B April 23, 2022, 10 a.m. OK Python 3 TESTS 44 218 13516800 800
154636254 Mo_elraghy B April 23, 2022, 8:51 a.m. OK Ruby 3 TESTS 44 373 18432000 800
154638046 Mo_elraghy B April 23, 2022, 9:10 a.m. OK Ruby 3 TESTS 44 389 18227200 800
154637957 Mo_elraghy B April 23, 2022, 9:09 a.m. OK Ruby 3 TESTS 44 405 18227200 800
154592272 DeadFox B April 22, 2022, 7:33 p.m. OK Rust 2021 TESTS 44 31 8294400 800
154654196 mocobeta B April 23, 2022, 12:09 p.m. OK Rust 2021 TESTS 44 31 13004800 800
154905600 Surrphy B April 25, 2022, 5:19 a.m. OK Rust 2021 TESTS 45 139 6553600 800
154653825 Surrphy B April 23, 2022, 12:05 p.m. OK Rust 2021 TESTS 44 140 8704000 800
154655995 Surrphy B April 23, 2022, 12:30 p.m. OK Rust 2021 TESTS 44 140 9011200 800
154655504 Surrphy B April 23, 2022, 12:25 p.m. OK Rust 2021 TESTS 44 140 9011200 800

remove filters

Back to search problems