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 |
---|---|---|---|---|---|---|
1975 | Codeforces Round 947 (Div. 1 + Div. 2) | FINISHED | False | 10800 | 20532263 | May 25, 2024, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 15095 ) | C | Chamo and Mocha's Array | PROGRAMMING | binary search brute force greedy | 1200 |
B"Mocha likes arrays, so before her departure, Chamo gave her an array a consisting of n positive integers as a gift. Mocha doesn't like arrays containing different numbers, so Mocha decides to use magic to change the array. Mocha can perform the following three-step operation some (possibly, zero) times: Suppose a=[1,2,3,4,5] initially: Mocha will perform the operation until the array contains only the same number. Mocha wants to know what is the maximum possible value of this number. ^ dagger The median in an array b of length m is an element that occupies position number lfloor frac{m+1}{2} rfloor after we sort the elements in non-decreasing order. For example, the median of [3,1,4,1,5] is 3 and the median of [5,25,20,24] is 20 . Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= q t <= q 500 ). The description of the test cases follows. The first line of each test case contains a single integer n ( 2 <= q n <= q 10^5 ) -- the length of the array a . The second line of each test case contains n integers a_1,a_2, ldots,a_n ( 1 <= q a_i <= q 10^9 ) -- the elements of the array a . It is guaranteed that the sum of n over all test cases does not exceed 10^5 . For each test case, output the maximum value of the number. In the first test case, a=[1,2] . Mocha can only choose the interval (l,r)=(1,2) . The array will be changed to a=[1,1] . Therefore, the answer is 1 . In the second test case, Mocha can perform the following operations: The array contains only the same number, which is 4 . It can be proven that the maximum value of the final number cannot be greater than 4 . "... |
editorial_zh.pdf |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
262787308 | YoussefAmr | C | May 26, 2024, 5:55 p.m. | OK | C# 10 | TESTS | 28 | 124 | 8601600 | 1200 | |
262825703 | Siddharth1411 | C | May 27, 2024, 5:13 a.m. | OK | C++14 (GCC 6-32) | TESTS | 28 | 62 | 0 | 1200 | |
262820293 | qifan_maker | C | May 27, 2024, 3:59 a.m. | OK | C++14 (GCC 6-32) | TESTS | 28 | 62 | 819200 | 1200 | |
263142645 | hokma | C | May 29, 2024, 12:46 p.m. | OK | C++14 (GCC 6-32) | TESTS | 28 | 62 | 3993600 | 1200 | |
262942217 | MrPython | C | May 28, 2024, 12:39 a.m. | OK | C++14 (GCC 6-32) | TESTS | 28 | 77 | 0 | 1200 | |
262910824 | manyu19 | C | May 27, 2024, 4:38 p.m. | OK | C++14 (GCC 6-32) | TESTS | 28 | 77 | 0 | 1200 | |
262712547 | _hsn_ | C | May 26, 2024, 1:50 p.m. | OK | C++14 (GCC 6-32) | TESTS | 28 | 77 | 102400 | 1200 | |
263424628 | TimSwn | C | May 31, 2024, 6:51 a.m. | OK | C++14 (GCC 6-32) | TESTS | 28 | 77 | 409600 | 1200 | |
263011147 | SDqwq | C | May 28, 2024, 12:38 p.m. | OK | C++14 (GCC 6-32) | TESTS | 28 | 77 | 409600 | 1200 | |
262983240 | luogu_bot2 | C | May 28, 2024, 8:44 a.m. | OK | C++14 (GCC 6-32) | TESTS | 28 | 77 | 409600 | 1200 | |
262980905 | wwMakima | C | May 28, 2024, 8:24 a.m. | OK | C++14 (GCC 6-32) | TESTS | 28 | 77 | 409600 | 1200 | |
263697350 | manish9660 | C | June 2, 2024, 4:07 a.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 62 | 0 | 1200 | |
263412730 | thefakepranav | C | May 31, 2024, 5:09 a.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 62 | 0 | 1200 | |
263187133 | dougalves | C | May 29, 2024, 9:44 p.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 62 | 0 | 1200 | |
263047465 | Blast4 | C | May 28, 2024, 5:37 p.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 62 | 0 | 1200 | |
263039097 | A_N_K_I_T_1_2_3 | C | May 28, 2024, 4:21 p.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 62 | 0 | 1200 | |
263033512 | lrkhafez01 | C | May 28, 2024, 3:36 p.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 62 | 0 | 1200 | |
262859269 | penguin__ | C | May 27, 2024, 9:44 a.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 62 | 0 | 1200 | |
262931202 | andrejikus | C | May 27, 2024, 8:18 p.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 62 | 409600 | 1200 | |
262819484 | porkchops | C | May 27, 2024, 3:46 a.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 62 | 409600 | 1200 | |
262819399 | porkchops | C | May 27, 2024, 3:45 a.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 62 | 409600 | 1200 | |
262834192 | N_z__ | C | May 27, 2024, 6:16 a.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 46 | 102400 | 1200 | |
262817819 | xiang_xiang | C | May 27, 2024, 3:19 a.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 61 | 48128000 | 1200 | |
263669797 | pstu-Sadman | C | June 1, 2024, 6:25 p.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 62 | 0 | 1200 | |
263661403 | shohagfaraji | C | June 1, 2024, 5:08 p.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 62 | 0 | 1200 | |
263658409 | Sharun_Tawsif | C | June 1, 2024, 4:42 p.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 62 | 0 | 1200 | |
263238482 | mahatabsheikh5 | C | May 30, 2024, 11:57 a.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 62 | 0 | 1200 | |
263193075 | Saul0906 | C | May 30, 2024, 12:38 a.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 62 | 0 | 1200 | |
263161338 | Mayank_Bad | C | May 29, 2024, 3:17 p.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 62 | 0 | 1200 | |
263152269 | Briceby | C | May 29, 2024, 1:59 p.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 62 | 0 | 1200 | |
262997113 | OMAR_TAHA | C | May 28, 2024, 10:45 a.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 62 | 0 | 1200 | |
262885818 | naman_hehe | C | May 27, 2024, 1:17 p.m. | OK | GNU C11 | TESTS | 28 | 77 | 409600 | 1200 | |
263427359 | NIEYUHAO | C | May 31, 2024, 7:13 a.m. | OK | GNU C11 | TESTS | 28 | 77 | 921600 | 1200 | |
263440557 | nguyenquocthao00 | C | May 31, 2024, 9:07 a.m. | OK | Go | TESTS | 28 | 78 | 5120000 | 1200 | |
263533741 | d_sqaure | C | May 31, 2024, 5:35 p.m. | OK | Go | TESTS | 28 | 93 | 2867200 | 1200 | |
262781992 | pookie_ | C | May 26, 2024, 5:06 p.m. | OK | Go | TESTS | 28 | 109 | 2867200 | 1200 | |
262854482 | Tobo | C | May 27, 2024, 9:03 a.m. | OK | Go | TESTS | 28 | 124 | 2867200 | 1200 | |
262862909 | AkshatSaxena_05 | C | May 27, 2024, 10:17 a.m. | OK | Java 21 | TESTS | 28 | 281 | 614400 | 1200 | |
262907760 | Kshitiz_san | C | May 27, 2024, 4:11 p.m. | OK | Java 21 | TESTS | 28 | 311 | 614400 | 1200 | |
262961335 | _global | C | May 28, 2024, 5:29 a.m. | OK | Java 21 | TESTS | 28 | 311 | 716800 | 1200 | |
262940706 | mangos194 | C | May 27, 2024, 11:56 p.m. | OK | Java 21 | TESTS | 28 | 312 | 819200 | 1200 | |
262968967 | Zhanzhe_Lee | C | May 28, 2024, 6:42 a.m. | OK | Java 21 | TESTS | 28 | 327 | 716800 | 1200 | |
263051961 | Omar_Morsi | C | May 28, 2024, 6:17 p.m. | OK | Java 21 | TESTS | 28 | 327 | 819200 | 1200 | |
263645542 | c1415926 | C | June 1, 2024, 2:54 p.m. | OK | Java 21 | TESTS | 28 | 328 | 716800 | 1200 | |
262977542 | dzhi | C | May 28, 2024, 7:56 a.m. | OK | Java 21 | TESTS | 28 | 328 | 921600 | 1200 | |
262975945 | sujalsharma_13 | C | May 28, 2024, 7:42 a.m. | OK | Java 21 | TESTS | 28 | 343 | 614400 | 1200 | |
262713376 | Alex_Toppo_06 | C | May 26, 2024, 1:58 p.m. | OK | Java 21 | TESTS | 28 | 343 | 819200 | 1200 | |
263123439 | cmpunk.rockzz | C | May 29, 2024, 10:07 a.m. | OK | Java 8 | TESTS | 28 | 296 | 307200 | 1200 | |
262877789 | Baidiki | C | May 27, 2024, 12:16 p.m. | OK | Java 8 | TESTS | 28 | 312 | 0 | 1200 | |
263017008 | statucci | C | May 28, 2024, 1:23 p.m. | OK | Java 8 | TESTS | 28 | 327 | 0 | 1200 | |
263598262 | adi00oo | C | June 1, 2024, 8:23 a.m. | OK | Java 8 | TESTS | 28 | 358 | 0 | 1200 | |
263010746 | RenukaMV | C | May 28, 2024, 12:34 p.m. | OK | Java 8 | TESTS | 28 | 374 | 0 | 1200 | |
262967446 | only_forward_ | C | May 28, 2024, 6:28 a.m. | OK | Java 8 | TESTS | 28 | 374 | 0 | 1200 | |
262853702 | wat2 | C | May 27, 2024, 8:56 a.m. | OK | Java 8 | TESTS | 28 | 374 | 18022400 | 1200 | |
263179171 | _satya_ | C | May 29, 2024, 7:38 p.m. | OK | Node.js | TESTS | 28 | 140 | 14643200 | 1200 | |
263086842 | timur_jalgasbaev | C | May 29, 2024, 4:51 a.m. | OK | PyPy 3 | TESTS | 28 | 249 | 10854400 | 1200 | |
262787577 | logankeede | C | May 26, 2024, 5:58 p.m. | OK | PyPy 3 | TESTS | 28 | 249 | 10956800 | 1200 | |
262789810 | Ahmed_Turkman | C | May 26, 2024, 6:20 p.m. | OK | PyPy 3 | TESTS | 28 | 265 | 10956800 | 1200 | |
263089666 | nealzane | C | May 29, 2024, 5:27 a.m. | OK | PyPy 3 | TESTS | 28 | 280 | 15052800 | 1200 | |
262865985 | xxx.ego | C | May 27, 2024, 10:43 a.m. | OK | PyPy 3 | TESTS | 28 | 359 | 10752000 | 1200 | |
262844335 | jvatsal0709 | C | May 27, 2024, 7:37 a.m. | OK | PyPy 3-64 | TESTS | 28 | 109 | 13926400 | 1200 | |
262855557 | acorn11 | C | May 27, 2024, 9:13 a.m. | OK | PyPy 3-64 | TESTS | 28 | 124 | 13312000 | 1200 | |
263105965 | JackQin | C | May 29, 2024, 7:46 a.m. | OK | PyPy 3-64 | TESTS | 28 | 124 | 14131200 | 1200 | |
263157275 | reijnnn | C | May 29, 2024, 2:40 p.m. | OK | PyPy 3-64 | TESTS | 28 | 125 | 15974400 | 1200 | |
262857129 | klu-2100030642 | C | May 27, 2024, 9:26 a.m. | OK | PyPy 3-64 | TESTS | 28 | 139 | 13619200 | 1200 | |
263157098 | reijnnn | C | May 29, 2024, 2:38 p.m. | OK | PyPy 3-64 | TESTS | 28 | 139 | 16179200 | 1200 | |
263038372 | victorrschmidt | C | May 28, 2024, 4:15 p.m. | OK | PyPy 3-64 | TESTS | 28 | 140 | 11366400 | 1200 | |
263229313 | bergus | C | May 30, 2024, 11:23 a.m. | OK | PyPy 3-64 | TESTS | 28 | 140 | 11980800 | 1200 | |
263016982 | AI_ | C | May 28, 2024, 1:23 p.m. | OK | PyPy 3-64 | TESTS | 28 | 140 | 13312000 | 1200 | |
262923451 | NadineMk | C | May 27, 2024, 6:39 p.m. | OK | PyPy 3-64 | TESTS | 28 | 140 | 13414400 | 1200 | |
262820813 | klu2100031976 | C | May 27, 2024, 4:07 a.m. | OK | Python 3 | TESTS | 28 | 124 | 15052800 | 1200 | |
262795842 | 2210080018 | C | May 26, 2024, 7:33 p.m. | OK | Python 3 | TESTS | 28 | 124 | 15052800 | 1200 | |
263172231 | CodeArmy | C | May 29, 2024, 5:30 p.m. | OK | Python 3 | TESTS | 28 | 139 | 15052800 | 1200 | |
262938532 | abo_shanab | C | May 27, 2024, 10:44 p.m. | OK | Python 3 | TESTS | 28 | 140 | 13619200 | 1200 | |
263560800 | prateekkhicher | C | June 1, 2024, 1:21 a.m. | OK | Python 3 | TESTS | 28 | 140 | 14028800 | 1200 | |
263536004 | thangnd2k | C | May 31, 2024, 5:55 p.m. | OK | Python 3 | TESTS | 28 | 140 | 14028800 | 1200 | |
263440573 | 2210030057 | C | May 31, 2024, 9:07 a.m. | OK | Python 3 | TESTS | 28 | 140 | 14028800 | 1200 | |
262932381 | AngryBiceps | C | May 27, 2024, 8:37 p.m. | OK | Python 3 | TESTS | 28 | 140 | 14028800 | 1200 | |
263440327 | DC_0001 | C | May 31, 2024, 9:04 a.m. | OK | Python 3 | TESTS | 28 | 155 | 14028800 | 1200 | |
262810323 | VioletVal | C | May 27, 2024, 12:34 a.m. | OK | Python 3 | TESTS | 28 | 155 | 14028800 | 1200 | |
263051737 | Maksim1744 | C | May 28, 2024, 6:15 p.m. | OK | Rust 2021 | TESTS | 28 | 62 | 0 | 1200 | |
263109861 | BetterThanNobita | C | May 29, 2024, 8:16 a.m. | OK | Rust 2021 | TESTS | 28 | 77 | 0 | 1200 | |
263107516 | Calvin65 | C | May 29, 2024, 7:58 a.m. | OK | Rust 2021 | TESTS | 28 | 77 | 0 | 1200 | |
262871963 | kshitij | C | May 27, 2024, 11:32 a.m. | OK | Rust 2021 | TESTS | 28 | 78 | 5939200 | 1200 |
Back to search problems