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 |
---|---|---|---|---|---|---|
1772 | Codeforces Round 839 (Div. 3) | FINISHED | False | 8100 | 65892263 | Dec. 18, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 16431 ) | D | Absolute Sorting | PROGRAMMING | math |
B'You are given an array a consisting of n integers. The array is sorted if a_1 <= a_2 <= ... <= a_n . You want to make the array a sorted by applying the following operation exactly once: Find any value of x that will make the array sorted, or report that there is no such value. The first line contains one integer t ( 1 <= t <= 2 cdot 10^4 ) -- the number of test cases. Each test case consists of two lines. The first line contains one integer n ( 2 <= n <= 2 cdot 10^5 ). The second line contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 10^8 ). Additional constraint on the input: the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, print any integer x ( 0 <= x <= 10^9 ) that makes the array sorted. It can be shown that if such an integer x exists, there is at least one such integer between 0 and 10^9 . If there is no such integer, then print -1 . If there are multiple suitable values of x , print any of them. In the first test case, after using x = 4 , the array becomes [1, 1, 1, 1, 1] . In the third test case, after using x = 0 , the array becomes [1, 2, 3, 4, 5, 6, 7, 8] . In the fourth test case, after using x = 42 , the array becomes [32, 37, 38, 39, 40, 41] . '... |
110313 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
186039640 | mban259 | D | Dec. 19, 2022, 8:06 p.m. | OK | C# 10 | TESTS | 30 | 93 | 16691200 | ||
185907490 | 17879963468 | D | Dec. 19, 2022, 4:27 a.m. | OK | Clang++17 Diagnostics | TESTS | 30 | 920 | 0 | ||
185900726 | ruban | D | Dec. 19, 2022, 1:36 a.m. | OK | Delphi | TESTS | 30 | 77 | 18534400 | ||
185880501 | winwinry | D | Dec. 18, 2022, 5:55 p.m. | OK | GNU C11 | TESTS | 30 | 77 | 1740800 | ||
186045933 | GTrigger | D | Dec. 19, 2022, 10:12 p.m. | OK | GNU C11 | TESTS | 30 | 140 | 819200 | ||
186054194 | INF_512 | D | Dec. 20, 2022, 2:39 a.m. | OK | GNU C++14 | TESTS | 30 | 46 | 819200 | ||
185907327 | azurite44392 | D | Dec. 19, 2022, 4:24 a.m. | OK | GNU C++14 | TESTS | 30 | 46 | 819200 | ||
186034532 | wwawwaww | D | Dec. 19, 2022, 7:12 p.m. | OK | GNU C++14 | TESTS | 30 | 62 | 819200 | ||
186032705 | _martynas | D | Dec. 19, 2022, 6:55 p.m. | OK | GNU C++14 | TESTS | 30 | 62 | 819200 | ||
186022579 | Blind-Old-People | D | Dec. 19, 2022, 5:41 p.m. | OK | GNU C++14 | TESTS | 30 | 62 | 819200 | ||
185959949 | zlq7777 | D | Dec. 19, 2022, 2:29 p.m. | OK | GNU C++14 | TESTS | 30 | 62 | 819200 | ||
185947935 | Grim_Reaper131719 | D | Dec. 19, 2022, 12:37 p.m. | OK | GNU C++14 | TESTS | 30 | 62 | 819200 | ||
185928941 | Lucky__Boy | D | Dec. 19, 2022, 9:16 a.m. | OK | GNU C++14 | TESTS | 30 | 62 | 819200 | ||
186053315 | lhzawa | D | Dec. 20, 2022, 2:15 a.m. | OK | GNU C++14 | TESTS | 30 | 62 | 819200 | ||
186055345 | fhhuo | D | Dec. 20, 2022, 3:06 a.m. | OK | GNU C++14 | TESTS | 30 | 62 | 819200 | ||
185907332 | YZcheng | D | Dec. 19, 2022, 4:24 a.m. | OK | GNU C++17 | TESTS | 30 | 46 | 819200 | ||
185883283 | Paatee | D | Dec. 18, 2022, 6:39 p.m. | OK | GNU C++17 | TESTS | 30 | 46 | 819200 | ||
185909478 | WulongQAQ | D | Dec. 19, 2022, 5:04 a.m. | OK | GNU C++17 | TESTS | 30 | 46 | 3993600 | ||
186055973 | Kiwi06 | D | Dec. 20, 2022, 3:17 a.m. | OK | GNU C++17 | TESTS | 30 | 62 | 819200 | ||
186037872 | Cristian_C | D | Dec. 19, 2022, 7:46 p.m. | OK | GNU C++17 | TESTS | 30 | 62 | 819200 | ||
186037361 | itsrohit | D | Dec. 19, 2022, 7:41 p.m. | OK | GNU C++17 | TESTS | 30 | 62 | 819200 | ||
186031238 | gabri_ | D | Dec. 19, 2022, 6:43 p.m. | OK | GNU C++17 | TESTS | 30 | 62 | 819200 | ||
186012703 | Muelsyse_ | D | Dec. 19, 2022, 4:39 p.m. | OK | GNU C++17 | TESTS | 30 | 62 | 819200 | ||
186051489 | monotone_matcha | D | Dec. 20, 2022, 1:24 a.m. | OK | GNU C++17 | TESTS | 30 | 62 | 819200 | ||
186050259 | lohelohelohe | D | Dec. 20, 2022, 12:46 a.m. | OK | GNU C++17 | TESTS | 30 | 62 | 819200 | ||
185953547 | Falkye | D | Dec. 19, 2022, 1:30 p.m. | OK | GNU C++17 (64) | TESTS | 30 | 46 | 0 | ||
185954463 | sagsango | D | Dec. 19, 2022, 1:38 p.m. | OK | GNU C++17 (64) | TESTS | 30 | 46 | 716800 | ||
185898919 | Yumee | D | Dec. 19, 2022, 12:20 a.m. | OK | GNU C++17 (64) | TESTS | 30 | 46 | 819200 | ||
186052776 | HideInTheSea | D | Dec. 20, 2022, 1:59 a.m. | OK | GNU C++17 (64) | TESTS | 30 | 46 | 819200 | ||
186049145 | enslaved | D | Dec. 20, 2022, 12:05 a.m. | OK | GNU C++17 (64) | TESTS | 30 | 46 | 819200 | ||
185950202 | _GENESIS | D | Dec. 19, 2022, 12:58 p.m. | OK | GNU C++17 (64) | TESTS | 30 | 46 | 819200 | ||
186055355 | aatrey | D | Dec. 20, 2022, 3:06 a.m. | OK | GNU C++17 (64) | TESTS | 30 | 46 | 1638400 | ||
185942750 | samyaksk10 | D | Dec. 19, 2022, 11:45 a.m. | OK | GNU C++17 (64) | TESTS | 30 | 46 | 1638400 | ||
185947968 | EotUL8d7 | D | Dec. 19, 2022, 12:37 p.m. | OK | GNU C++17 (64) | TESTS | 30 | 46 | 1638400 | ||
186034793 | julianferres | D | Dec. 19, 2022, 7:14 p.m. | OK | GNU C++17 (64) | TESTS | 30 | 46 | 1638400 | ||
185956762 | n1cknamezz | D | Dec. 19, 2022, 2 p.m. | OK | GNU C++20 (64) | TESTS | 30 | 31 | 819200 | ||
185913369 | Lntano. | D | Dec. 19, 2022, 6:13 a.m. | OK | GNU C++20 (64) | TESTS | 30 | 31 | 819200 | ||
185907485 | zerofafa | D | Dec. 19, 2022, 4:27 a.m. | OK | GNU C++20 (64) | TESTS | 30 | 31 | 819200 | ||
185906747 | BhupinderJ | D | Dec. 19, 2022, 4:13 a.m. | OK | GNU C++20 (64) | TESTS | 30 | 31 | 819200 | ||
185881594 | _Neel_ | D | Dec. 18, 2022, 6:14 p.m. | OK | GNU C++20 (64) | TESTS | 30 | 31 | 819200 | ||
186057450 | yuhang123 | D | Dec. 20, 2022, 3:43 a.m. | OK | GNU C++20 (64) | TESTS | 30 | 31 | 819200 | ||
186026787 | AdnanKhan-ak47 | D | Dec. 19, 2022, 6:09 p.m. | OK | GNU C++20 (64) | TESTS | 30 | 31 | 819200 | ||
185924007 | Mohmed_Shabaan | D | Dec. 19, 2022, 8:20 a.m. | OK | GNU C++20 (64) | TESTS | 30 | 31 | 1638400 | ||
185956716 | Fellow_junior | D | Dec. 19, 2022, 2 p.m. | OK | GNU C++20 (64) | TESTS | 30 | 31 | 1638400 | ||
185952875 | 0x5f | D | Dec. 19, 2022, 1:24 p.m. | OK | GNU C++20 (64) | TESTS | 30 | 31 | 1638400 | ||
185905626 | pushkar.lonkar21 | D | Dec. 19, 2022, 3:49 a.m. | OK | Java 11 | TESTS | 30 | 187 | 409600 | ||
185917957 | vishal_sahu | D | Dec. 19, 2022, 7:09 a.m. | OK | Java 11 | TESTS | 30 | 218 | 2560000 | ||
185941545 | vermadv2000 | D | Dec. 19, 2022, 11:32 a.m. | OK | Java 11 | TESTS | 30 | 233 | 409600 | ||
185894541 | ahmedyasserxXx | D | Dec. 18, 2022, 9:44 p.m. | OK | Java 11 | TESTS | 30 | 374 | 2355200 | ||
185890177 | ETHANHUNTMI5 | D | Dec. 18, 2022, 8:19 p.m. | OK | Java 11 | TESTS | 30 | 374 | 2457600 | ||
186057962 | faith_star | D | Dec. 20, 2022, 3:51 a.m. | OK | Java 11 | TESTS | 30 | 374 | 13824000 | ||
185914659 | kasiru_69 | D | Dec. 19, 2022, 6:29 a.m. | OK | Java 11 | TESTS | 30 | 389 | 409600 | ||
185895866 | profchi | D | Dec. 18, 2022, 10:20 p.m. | OK | Java 11 | TESTS | 30 | 405 | 409600 | ||
185905521 | amanraj01 | D | Dec. 19, 2022, 3:46 a.m. | OK | Java 11 | TESTS | 30 | 530 | 204800 | ||
185905287 | amanraj01 | D | Dec. 19, 2022, 3:41 a.m. | OK | Java 11 | TESTS | 30 | 592 | 102400 | ||
185938244 | manasrai1234567 | D | Dec. 19, 2022, 10:59 a.m. | OK | Java 17 | TESTS | 30 | 202 | 1126400 | ||
185888707 | Utsav82 | D | Dec. 18, 2022, 7:57 p.m. | OK | Java 17 | TESTS | 30 | 217 | 13619200 | ||
186038934 | AL-Muzahid | D | Dec. 19, 2022, 7:57 p.m. | OK | Java 17 | TESTS | 30 | 218 | 1331200 | ||
186055626 | ypa | D | Dec. 20, 2022, 3:10 a.m. | OK | Java 17 | TESTS | 30 | 218 | 1433600 | ||
185888914 | Utsav82 | D | Dec. 18, 2022, 8 p.m. | OK | Java 17 | TESTS | 30 | 218 | 13926400 | ||
185935748 | Badass_Nemesis | D | Dec. 19, 2022, 10:32 a.m. | OK | Java 17 | TESTS | 30 | 249 | 614400 | ||
185890863 | Eugenics | D | Dec. 18, 2022, 8:31 p.m. | OK | Java 17 | TESTS | 30 | 265 | 1126400 | ||
185886256 | irachit0702 | D | Dec. 18, 2022, 7:21 p.m. | OK | Java 17 | TESTS | 30 | 327 | 1126400 | ||
185903906 | iamJatinYadav | D | Dec. 19, 2022, 3:09 a.m. | OK | Java 17 | TESTS | 30 | 327 | 1843200 | ||
186007710 | kaifkhan.biz | D | Dec. 19, 2022, 4:24 p.m. | OK | Java 17 | TESTS | 30 | 342 | 1536000 | ||
185903879 | cys02 | D | Dec. 19, 2022, 3:08 a.m. | OK | Java 8 | TESTS | 30 | 140 | 5427200 | ||
185891055 | 1091857051 | D | Dec. 18, 2022, 8:34 p.m. | OK | Java 8 | TESTS | 30 | 171 | 0 | ||
186018862 | handle007 | D | Dec. 19, 2022, 5:19 p.m. | OK | Java 8 | TESTS | 30 | 217 | 17612800 | ||
186019946 | ahmedTarek28 | D | Dec. 19, 2022, 5:25 p.m. | OK | Java 8 | TESTS | 30 | 218 | 17612800 | ||
185975684 | khan1121 | D | Dec. 19, 2022, 3:06 p.m. | OK | Java 8 | TESTS | 30 | 295 | 7372800 | ||
185959444 | khan1121 | D | Dec. 19, 2022, 2:24 p.m. | OK | Java 8 | TESTS | 30 | 295 | 7372800 | ||
185958568 | chuquwan9964 | D | Dec. 19, 2022, 2:16 p.m. | OK | Java 8 | TESTS | 30 | 514 | 0 | ||
185897013 | Flame239 | D | Dec. 18, 2022, 11 p.m. | OK | Kotlin 1.7 | TESTS | 30 | 935 | 100454400 | ||
185925267 | xiao_derder | D | Dec. 19, 2022, 8:35 a.m. | OK | MS C++ 2017 | TESTS | 30 | 78 | 819200 | ||
185935554 | timusmanovs | D | Dec. 19, 2022, 10:30 a.m. | OK | MS C++ 2017 | TESTS | 30 | 202 | 819200 | ||
185903342 | 22zhangchuanlong | D | Dec. 19, 2022, 2:54 a.m. | OK | MS C++ 2017 | TESTS | 30 | 265 | 0 | ||
185887532 | adesh123 | D | Dec. 18, 2022, 7:40 p.m. | OK | MS C++ 2017 | TESTS | 30 | 280 | 819200 | ||
185931970 | CtrlACtrlV | D | Dec. 19, 2022, 9:49 a.m. | OK | MS C++ 2017 | TESTS | 30 | 296 | 819200 | ||
185883173 | Vitru | D | Dec. 18, 2022, 6:37 p.m. | OK | MS C++ 2017 | TESTS | 30 | 296 | 819200 | ||
185905610 | bokunopicolo | D | Dec. 19, 2022, 3:49 a.m. | OK | PyPy 3 | TESTS | 30 | 342 | 18124800 | ||
185932095 | mohitejaikumar | D | Dec. 19, 2022, 9:50 a.m. | OK | PyPy 3 | TESTS | 30 | 389 | 17715200 | ||
185892300 | Su_123 | D | Dec. 18, 2022, 8:55 p.m. | OK | PyPy 3 | TESTS | 30 | 389 | 18739200 | ||
185892050 | Su_123 | D | Dec. 18, 2022, 8:51 p.m. | OK | PyPy 3 | TESTS | 30 | 404 | 24371200 | ||
185904934 | Raindrops1117 | D | Dec. 19, 2022, 3:32 a.m. | OK | PyPy 3 | TESTS | 30 | 420 | 21708800 | ||
185955237 | LumosMaxima | D | Dec. 19, 2022, 1:46 p.m. | OK | PyPy 3 | TESTS | 30 | 733 | 18432000 | ||
186013568 | Abu_Bakar_Siddik | D | Dec. 19, 2022, 4:53 p.m. | OK | PyPy 3 | TESTS | 30 | 748 | 18432000 | ||
185958117 | singhanki | D | Dec. 19, 2022, 2:12 p.m. | OK | PyPy 3 | TESTS | 30 | 857 | 18432000 | ||
185889420 | suvenrj | D | Dec. 18, 2022, 8:07 p.m. | OK | PyPy 3 | TESTS | 30 | 857 | 18534400 | ||
186015058 | vrishabshetty | D | Dec. 19, 2022, 5:02 p.m. | OK | PyPy 3 | TESTS | 30 | 919 | 18124800 | ||
186059614 | SophieHatter | D | Dec. 20, 2022, 4:20 a.m. | OK | PyPy 3-64 | TESTS | 30 | 171 | 27136000 | ||
185919872 | toam | D | Dec. 19, 2022, 7:30 a.m. | OK | PyPy 3-64 | TESTS | 30 | 171 | 29081600 | ||
185893782 | beethoven97 | D | Dec. 18, 2022, 9:25 p.m. | OK | PyPy 3-64 | TESTS | 30 | 202 | 21299200 | ||
186052449 | hkwu6013 | D | Dec. 20, 2022, 1:50 a.m. | OK | PyPy 3-64 | TESTS | 30 | 202 | 26624000 | ||
186028634 | thewrongmystery | D | Dec. 19, 2022, 6:22 p.m. | OK | PyPy 3-64 | TESTS | 30 | 202 | 29388800 | ||
185921112 | mayank35 | D | Dec. 19, 2022, 7:45 a.m. | OK | PyPy 3-64 | TESTS | 30 | 233 | 23347200 | ||
185935692 | ketanraut88 | D | Dec. 19, 2022, 10:31 a.m. | OK | PyPy 3-64 | TESTS | 30 | 233 | 29286400 | ||
185884278 | kavorka | D | Dec. 18, 2022, 6:53 p.m. | OK | PyPy 3-64 | TESTS | 30 | 233 | 32256000 | ||
185955890 | D.V.Aravind | D | Dec. 19, 2022, 1:52 p.m. | OK | PyPy 3-64 | TESTS | 30 | 249 | 21606400 | ||
185952294 | generalPurpose | D | Dec. 19, 2022, 1:19 p.m. | OK | PyPy 3-64 | TESTS | 30 | 249 | 30617600 | ||
185914944 | sagamantus | D | Dec. 19, 2022, 6:33 a.m. | OK | Python 3 | TESTS | 30 | 327 | 15462400 | ||
185924996 | omar.gawdat | D | Dec. 19, 2022, 8:32 a.m. | OK | Python 3 | TESTS | 30 | 342 | 16179200 | ||
186028582 | thewrongmystery | D | Dec. 19, 2022, 6:22 p.m. | OK | Python 3 | TESTS | 30 | 343 | 15462400 | ||
185943534 | broshen | D | Dec. 19, 2022, 11:53 a.m. | OK | Python 3 | TESTS | 30 | 420 | 15462400 | ||
185881001 | meohenbk | D | Dec. 18, 2022, 6:04 p.m. | OK | Python 3 | TESTS | 30 | 436 | 16179200 | ||
186044775 | VioletVal | D | Dec. 19, 2022, 9:41 p.m. | OK | Python 3 | TESTS | 30 | 451 | 15462400 | ||
185947147 | Ssneh | D | Dec. 19, 2022, 12:30 p.m. | OK | Python 3 | TESTS | 30 | 451 | 15462400 | ||
186028448 | thewrongmystery | D | Dec. 19, 2022, 6:21 p.m. | OK | Python 3 | TESTS | 30 | 498 | 15462400 | ||
186012506 | phlai326 | D | Dec. 19, 2022, 4:36 p.m. | OK | Python 3 | TESTS | 30 | 498 | 15462400 | ||
185923075 | aspshailu | D | Dec. 19, 2022, 8:08 a.m. | OK | Python 3 | TESTS | 30 | 514 | 15462400 | ||
185903719 | Sempr | D | Dec. 19, 2022, 3:04 a.m. | OK | Rust 2021 | TESTS | 30 | 31 | 4812800 | ||
185882219 | Swordelf | D | Dec. 18, 2022, 6:23 p.m. | OK | Rust 2021 | TESTS | 30 | 46 | 15564800 | ||
185956597 | pohzipohzi | D | Dec. 19, 2022, 1:59 p.m. | OK | Rust 2021 | TESTS | 30 | 46 | 16384000 |
Back to search problems