Codeforces Round 724 (Div. 2)

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
1536 Codeforces Round 724 (Div. 2) FINISHED False 7200 114189863 June 6, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4765 ) D Omkar and Medians PROGRAMMING data structures greedy implementation 2000

B"Uh oh! Ray lost his array yet again! However, Omkar might be able to help because he thinks he has found the OmkArray of Ray's array. The OmkArray of an array a with elements a_1, a_2, ldots, a_{2k-1} , is the array b with elements b_1, b_2, ldots, b_{k} such that b_i is equal to the median of a_1, a_2, ldots, a_{2i-1} for all i . Omkar has found an array b of size n ( 1 <= q n <= q 2 cdot 10^5 , -10^9 <= q b_i <= q 10^9 ). Given this array b , Ray wants to test Omkar's claim and see if b actually is an OmkArray of some array a . Can you help Ray? The median of a set of numbers a_1, a_2, ldots, a_{2i-1} is the number c_{i} where c_{1}, c_{2}, ldots, c_{2i-1} represents a_1, a_2, ldots, a_{2i-1} sorted in nondecreasing order. Each test contains multiple test cases. The first line contains a single integer t ( 1 <= q t <= q 10^4 ) -- 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 2 cdot 10^5 ) -- the length of the array b . The second line contains n integers b_1, b_2, ldots, b_n ( -10^9 <= q b_i <= q 10^9 ) -- the elements of b . It is guaranteed the sum of n across all test cases does not exceed 2 cdot 10^5 . For each test case, output one line containing YES if there exists an array a such that b_i is the median of a_1, a_2, ... , a_{2i-1} for all i , and NO otherwise. The case of letters in YES and NO do not matter (so yEs and No will also be accepted). In the second case of the first sample, the array [4] will generate an OmkArray of [4] , as the median of the first element is 4 . In the fourth case of the first sample, the array [3, 2, 5] will generate an OmkArray of [3, 3] , as the median of 3 is 3 and the median of 2, 3, 5 is"...

Tutorials

Codeforces Round #724 — Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
118672902 Aestas16 D June 6, 2021, 11:34 p.m. OK GNU C++11 TESTS 42 46 3174400 2000
118686466 Acfboy D June 7, 2021, 5:29 a.m. OK GNU C++11 TESTS 42 62 4812800 2000
118647683 ttee D June 6, 2021, 4:21 p.m. OK GNU C++11 TESTS 42 62 5632000 2000
118646336 FluffyTT D June 6, 2021, 4:17 p.m. OK GNU C++11 TESTS 42 62 6041600 2000
118651265 imagine7 D June 6, 2021, 4:32 p.m. OK GNU C++11 TESTS 42 62 7270400 2000
118675970 _Leaving_ D June 7, 2021, 2:01 a.m. OK GNU C++11 TESTS 42 77 2150400 2000
118651516 peter112358 D June 6, 2021, 4:32 p.m. OK GNU C++11 TESTS 42 77 6451200 2000
118673931 henry-tb D June 7, 2021, 12:38 a.m. OK GNU C++11 TESTS 42 93 2457600 2000
118677068 black_white_tony D June 7, 2021, 2:31 a.m. OK GNU C++11 TESTS 42 93 3174400 2000
118681542 Celtic D June 7, 2021, 4:08 a.m. OK GNU C++11 TESTS 42 93 4812800 2000
118675113 tnaito D June 7, 2021, 1:32 a.m. OK GNU C++14 TESTS 42 78 2764800 2000
118652212 LCMjuruo D June 6, 2021, 4:34 p.m. OK GNU C++14 TESTS 42 78 4505600 2000
118661551 Cratos-101 D June 6, 2021, 6:17 p.m. OK GNU C++14 TESTS 42 78 5836800 2000
118649128 tantheta01 D June 6, 2021, 4:25 p.m. OK GNU C++14 TESTS 42 78 5836800 2000
118646845 Kwords D June 6, 2021, 4:19 p.m. OK GNU C++14 TESTS 42 93 5017600 2000
118671408 _apurv_ D June 6, 2021, 10:07 p.m. OK GNU C++14 TESTS 42 93 5836800 2000
118649347 dhruvumesh25 D June 6, 2021, 4:26 p.m. OK GNU C++14 TESTS 42 93 5836800 2000
118651138 Ertugrul28 D June 6, 2021, 4:31 p.m. OK GNU C++14 TESTS 42 93 5939200 2000
118650178 Prince_Kassad D June 6, 2021, 4:29 p.m. OK GNU C++14 TESTS 42 93 21196800 2000
118688230 darknight0409 D June 7, 2021, 5:54 a.m. OK GNU C++14 TESTS 42 108 11468800 2000
118647887 codercody D June 6, 2021, 4:22 p.m. OK GNU C++17 TESTS 42 61 2764800 2000
118646307 claro_henrique D June 6, 2021, 4:17 p.m. OK GNU C++17 TESTS 42 78 1536000 2000
118685996 EmZie D June 7, 2021, 5:22 a.m. OK GNU C++17 TESTS 42 78 2048000 2000
118661806 lucaperju D June 6, 2021, 6:20 p.m. OK GNU C++17 TESTS 42 78 5017600 2000
118685644 ZeldaHuang D June 7, 2021, 5:17 a.m. OK GNU C++17 TESTS 42 78 9011200 2000
118654034 albertxwz D June 6, 2021, 5:15 p.m. OK GNU C++17 TESTS 42 92 2457600 2000
118685960 vjudge3 D June 7, 2021, 5:22 a.m. OK GNU C++17 TESTS 42 93 1945600 2000
118674153 wuruzhao D June 7, 2021, 12:50 a.m. OK GNU C++17 TESTS 42 93 2355200 2000
118667893 Neel_Patel D June 6, 2021, 8:11 p.m. OK GNU C++17 TESTS 42 93 2867200 2000
118650468 OceanDiver D June 6, 2021, 4:30 p.m. OK GNU C++17 TESTS 42 93 2867200 2000
118646720 ExplodingFreeze D June 6, 2021, 4:18 p.m. OK GNU C++17 (64) TESTS 42 62 3379200 2000
118686886 ___dreamer__ D June 7, 2021, 5:36 a.m. OK GNU C++17 (64) TESTS 42 62 7270400 2000
118657923 kevin D June 6, 2021, 5:41 p.m. OK GNU C++17 (64) TESTS 42 62 7987200 2000
118671872 CartesianTree D June 6, 2021, 10:31 p.m. OK GNU C++17 (64) TESTS 42 77 4505600 2000
118648434 pradnesh D June 6, 2021, 4:23 p.m. OK GNU C++17 (64) TESTS 42 77 8396800 2000
118677570 edenooo D June 7, 2021, 2:43 a.m. OK GNU C++17 (64) TESTS 42 77 10444800 2000
118648991 Irene D June 6, 2021, 4:25 p.m. OK GNU C++17 (64) TESTS 42 93 7987200 2000
118660613 czhang2718 D June 6, 2021, 6:11 p.m. OK GNU C++17 (64) TESTS 42 93 9728000 2000
118654137 Ayham_Dabah D June 6, 2021, 5:15 p.m. OK GNU C++17 (64) TESTS 42 93 9728000 2000
118648070 TheLastHope D June 6, 2021, 4:22 p.m. OK GNU C++17 (64) TESTS 42 93 9728000 2000
118655324 0x3F D June 6, 2021, 5:21 p.m. OK Go TESTS 42 264 5427200 2000
118649152 Airflow D June 6, 2021, 4:26 p.m. OK Haskell TESTS 42 77 7475200 2000
118660743 Saimon_Saret D June 6, 2021, 6:12 p.m. OK Java 11 TESTS 42 280 3174400 2000
118673648 Asgar D June 7, 2021, 12:23 a.m. OK Java 11 TESTS 42 311 8601600 2000
118676381 pikachu_pika_pika D June 7, 2021, 2:14 a.m. OK Java 11 TESTS 42 311 11468800 2000
118645666 derrick20 D June 6, 2021, 4:15 p.m. OK Java 11 TESTS 42 327 5324800 2000
118656583 spide333 D June 6, 2021, 5:30 p.m. OK Java 11 TESTS 42 342 13824000 2000
118686131 cyberphobia D June 7, 2021, 5:24 a.m. OK Java 11 TESTS 42 358 6553600 2000
118688245 T_Chakrawarty D June 7, 2021, 5:54 a.m. OK Java 11 TESTS 42 358 9216000 2000
118654847 vineet16 D June 6, 2021, 5:19 p.m. OK Java 11 TESTS 42 436 37376000 2000
118679762 jamesfan961101 D June 7, 2021, 3:31 a.m. OK Java 11 TESTS 42 467 0 2000
118672352 amit_chas D June 6, 2021, 11 p.m. OK Java 11 TESTS 42 482 30208000 2000
118650857 beroul D June 6, 2021, 4:31 p.m. OK Java 8 TESTS 42 218 3686400 2000
118673030 nickmikemurderer D June 6, 2021, 11:41 p.m. OK Java 8 TESTS 42 233 4505600 2000
118679256 pribic D June 7, 2021, 3:20 a.m. OK Java 8 TESTS 42 280 18022400 2000
118679186 pribic D June 7, 2021, 3:18 a.m. OK Java 8 TESTS 42 280 18022400 2000
118663407 gagan_6730 D June 6, 2021, 6:44 p.m. OK Java 8 TESTS 42 296 16896000 2000
118685416 JunBinLiang D June 7, 2021, 5:14 a.m. OK Java 8 TESTS 42 296 17920000 2000
118682372 pribic D June 7, 2021, 4:22 a.m. OK Java 8 TESTS 42 327 16486400 2000
118682347 pribic D June 7, 2021, 4:22 a.m. OK Java 8 TESTS 42 327 18022400 2000
118679801 aggarwalanshul01 D June 7, 2021, 3:32 a.m. OK Java 8 TESTS 42 358 16281600 2000
118679947 aggarwalanshul01 D June 7, 2021, 3:35 a.m. OK Java 8 TESTS 42 374 16281600 2000
118661958 cmplx-xyttmt D June 6, 2021, 6:22 p.m. OK Kotlin TESTS 42 405 19148800 2000
118666167 Golovanov399 D June 6, 2021, 7:33 p.m. OK Kotlin TESTS 42 452 32563200 2000
118648803 moreda D June 6, 2021, 4:24 p.m. OK MS C++ 2017 TESTS 42 233 6451200 2000
118658249 cs_tree D June 6, 2021, 5:44 p.m. OK PyPy 2 TESTS 42 202 16384000 2000
118654193 cs_tree D June 6, 2021, 5:15 p.m. OK PyPy 2 TESTS 42 233 15155200 2000
118663019 NaAm_ME_kYa_raKhA_hAi D June 6, 2021, 6:37 p.m. OK PyPy 2 TESTS 42 779 19251200 2000
118659863 agarus D June 6, 2021, 6:02 p.m. OK PyPy 3 TESTS 42 421 20172800 2000
118656093 coder_sounak D June 6, 2021, 5:26 p.m. OK PyPy 3 TESTS 42 483 29491200 2000
118667300 FireBird23 D June 6, 2021, 7:58 p.m. OK PyPy 3 TESTS 42 499 31539200 2000
118656192 justinz2018 D June 6, 2021, 5:27 p.m. OK PyPy 3 TESTS 42 576 22835200 2000
118645541 augurar D June 6, 2021, 4:15 p.m. OK PyPy 3 TESTS 42 592 19558400 2000
118650137 Mukundan314 D June 6, 2021, 4:29 p.m. OK PyPy 3 TESTS 42 732 19763200 2000
118664798 _aadiupadhyay_ D June 6, 2021, 7:07 p.m. OK PyPy 3 TESTS 42 811 20070400 2000
118655813 jimm89 D June 6, 2021, 5:24 p.m. OK PyPy 3 TESTS 42 966 21708800 2000
118663728 puffc0rn D June 6, 2021, 6:49 p.m. OK PyPy 3 TESTS 42 982 21708800 2000
118650527 not_tehlka D June 6, 2021, 4:30 p.m. OK PyPy 3 TESTS 42 1013 24064000 2000
118684003 sh1194 D June 7, 2021, 4:51 a.m. OK Python 3 TESTS 42 389 22835200 2000

remove filters

Back to search problems