Codeforces Round 641 (Div. 1)

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
1349 Codeforces Round 641 (Div. 1) FINISHED False 9000 148065911 May 12, 2020, 12:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 8277 ) B Orac and Medians PROGRAMMING constructive algorithms greedy math 2000

B"Slime has a sequence of positive integers a_1, a_2, ldots, a_n . In one operation Orac can choose an arbitrary subsegment [l ldots r] of this sequence and replace all values a_l, a_{l + 1}, ldots, a_r to the value of median of {a_l, a_{l + 1}, ldots, a_r } . In this problem, for the integer multiset s , the median of s is equal to the lfloor frac{|s|+1}{2} rfloor -th smallest number in it. For example, the median of {1,4,4,6,5 } is 4 , and the median of {1,7,5,8 } is 5 . Slime wants Orac to make a_1 = a_2 = ldots = a_n = k using these operations. Orac thinks that it is impossible, and he does not want to waste his time, so he decided to ask you if it is possible to satisfy the Slime's requirement, he may ask you these questions several times. The first line of the input is a single integer t : the number of queries. The first line of each query contains two integers n (1 <= n <= 100 ,000) and k (1 <= k <= 10^9) , the second line contains n positive integers a_1,a_2, ... ,a_n (1 <= a_i <= 10^9) The total sum of n is at most 100 ,000 . The output should contain t lines. The i -th line should be equal to 'yes' if it is possible to make all integers k in some number of operations or 'no', otherwise. You can print each letter in lowercase or uppercase. In the first query, Orac can't turn all elements into 3 . In the second query, a_1=6 is already satisfied. In the third query, Orac can select the complete array and turn all elements into 2 . In the fourth query, Orac can't turn all elements into 3 . In the fifth query, Orac can select [1,6] at first and then select [2,10] . "...

Tutorials

Codeforces Round #641 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
79853841 Gassa B May 12, 2020, 1:34 p.m. OK D TESTS 69 155 8908800 2000
79832912 hos.lyric B May 12, 2020, 12:57 p.m. OK D TESTS 69 171 10854400 2000
80928806 luogu_bot1 B May 22, 2020, 11:28 a.m. OK GNU C++11 TESTS 70 31 409600 2000
81425190 Shiina_Mashiro19 B May 25, 2020, 11:17 p.m. OK GNU C++11 TESTS 70 31 614400 2000
80423171 wsk1202 B May 17, 2020, 1:07 a.m. OK GNU C++11 TESTS 70 31 4096000 2000
79957959 Enderturtle B May 13, 2020, 8:22 a.m. OK GNU C++11 TESTS 70 31 4096000 2000
80290826 wasa855 B May 16, 2020, 7:41 a.m. OK GNU C++11 TESTS 70 31 4300800 2000
80212085 _DAG_ B May 15, 2020, 9:59 a.m. OK GNU C++11 TESTS 70 31 4300800 2000
80076047 Larry0101 B May 14, 2020, 1:56 p.m. OK GNU C++11 TESTS 70 31 4300800 2000
79928920 yuzhechuan B May 12, 2020, 11:36 p.m. OK GNU C++11 TESTS 70 31 4403200 2000
79940498 scimoon B May 13, 2020, 4:23 a.m. OK GNU C++11 TESTS 70 31 4505600 2000
79936931 froggyzhang B May 13, 2020, 3:11 a.m. OK GNU C++11 TESTS 70 31 4505600 2000
79853554 NotaMotuaQAQ B May 12, 2020, 1:33 p.m. OK GNU C++14 TESTS 69 31 8294400 2000
79844341 11235813213455 B May 12, 2020, 1:15 p.m. OK GNU C++14 TESTS 69 46 5939200 2000
80023600 201801090150 B May 14, 2020, 1:01 a.m. OK GNU C++14 TESTS 70 61 4403200 2000
79948311 alexander86 B May 13, 2020, 6:21 a.m. OK GNU C++14 TESTS 70 61 4403200 2000
79842028 snow39 B May 12, 2020, 1:11 p.m. OK GNU C++14 TESTS 69 61 5222400 2000
79903808 TadijaSebez B May 12, 2020, 4:44 p.m. OK GNU C++14 TESTS 70 62 3993600 2000
79908079 robert.barbu27 B May 12, 2020, 5:25 p.m. OK GNU C++14 TESTS 70 62 4198400 2000
79842908 exqt B May 12, 2020, 1:12 p.m. OK GNU C++14 TESTS 69 62 4198400 2000
79822255 ainta B May 12, 2020, 12:44 p.m. OK GNU C++14 TESTS 69 62 4300800 2000
80297848 CrayonKe B May 16, 2020, 9:08 a.m. OK GNU C++14 TESTS 70 62 4403200 2000
79870468 limbo.null B May 12, 2020, 2:10 p.m. OK GNU C++17 TESTS 69 31 6656000 2000
79933690 nickluo B May 13, 2020, 1:55 a.m. OK GNU C++17 TESTS 70 46 4710400 2000
79839042 RUSH_D_CAT B May 12, 2020, 1:06 p.m. OK GNU C++17 TESTS 69 46 4915200 2000
79933423 HatsuneMikuo B May 13, 2020, 1:49 a.m. OK GNU C++17 TESTS 70 46 5324800 2000
80299459 _andyli B May 16, 2020, 9:29 a.m. OK GNU C++17 TESTS 70 46 8294400 2000
80796766 doped.silicon B May 20, 2020, 5:51 p.m. OK GNU C++17 TESTS 70 61 1638400 2000
79845795 Vedensky B May 12, 2020, 1:18 p.m. OK GNU C++17 TESTS 69 61 4198400 2000
79883511 natsugiri B May 12, 2020, 2:42 p.m. OK GNU C++17 TESTS 69 61 4403200 2000
79864043 Kerim.K B May 12, 2020, 1:55 p.m. OK GNU C++17 TESTS 69 61 4403200 2000
79976061 Nlygayatb B May 13, 2020, 11:54 a.m. OK GNU C++17 TESTS 70 61 4812800 2000
81456026 cjy2003 B May 26, 2020, 9:33 a.m. OK GNU C++17 (64) TESTS 70 30 3072000 2000
81009644 petushara B May 23, 2020, 11:25 a.m. OK GNU C++17 (64) TESTS 70 31 409600 2000
79845127 yosupo B May 12, 2020, 1:17 p.m. OK GNU C++17 (64) TESTS 69 31 5017600 2000
79933355 interestingLSY B May 13, 2020, 1:47 a.m. OK GNU C++17 (64) TESTS 70 31 5939200 2000
79833149 Egor B May 12, 2020, 12:57 p.m. OK GNU C++17 (64) TESTS 69 31 5939200 2000
79938328 liouzhou_101 B May 13, 2020, 3:40 a.m. OK GNU C++17 (64) TESTS 70 31 7987200 2000
80566703 vjudge5 B May 18, 2020, 3:51 a.m. OK GNU C++17 (64) TESTS 70 46 4710400 2000
79873493 msporyshev B May 12, 2020, 2:18 p.m. OK GNU C++17 (64) TESTS 69 46 4710400 2000
79853168 hamayanhamayan B May 12, 2020, 1:32 p.m. OK GNU C++17 (64) TESTS 69 46 4710400 2000
79852573 Geothermal B May 12, 2020, 1:31 p.m. OK GNU C++17 (64) TESTS 69 46 4710400 2000
79841119 cirno3153 B May 12, 2020, 1:09 p.m. OK Java 11 TESTS 69 218 23961600 2000
79847407 uwi B May 12, 2020, 1:21 p.m. OK Java 11 TESTS 69 218 24166400 2000
79987610 TheSawan B May 13, 2020, 2:07 p.m. OK Java 11 TESTS 70 233 24064000 2000
79897403 mikit B May 12, 2020, 3:56 p.m. OK Java 11 TESTS 69 295 24268800 2000
81143507 533.sandyhu B May 24, 2020, 7:44 a.m. OK Java 11 TESTS 70 764 0 2000
80883588 egaeus.code B May 21, 2020, 7:25 p.m. OK Java 11 TESTS 70 857 0 2000
80276093 adarsh000321 B May 16, 2020, 4:03 a.m. OK Java 11 TESTS 70 857 23961600 2000
79955089 aman_29 B May 13, 2020, 7:46 a.m. OK Java 11 TESTS 70 858 41472000 2000
80044197 danidabsh B May 14, 2020, 7:40 a.m. OK Java 11 TESTS 70 1122 24576000 2000
80588288 parasmadan15 B May 18, 2020, 9:41 a.m. OK Java 11 TESTS 70 1216 24576000 2000
80423608 bluesky111 B May 17, 2020, 1:21 a.m. OK Java 8 TESTS 70 124 20480000 2000
79882907 StayAwayFromBitches B May 12, 2020, 2:41 p.m. OK Java 8 TESTS 69 124 21196800 2000
80216912 spar5h B May 15, 2020, 10:56 a.m. OK Java 8 TESTS 70 139 20582400 2000
79862700 aman28rwt B May 12, 2020, 1:52 p.m. OK Java 8 TESTS 69 140 21196800 2000
80433673 yaoct B May 17, 2020, 5:15 a.m. OK Java 8 TESTS 70 155 20684800 2000
80075820 tahasin B May 14, 2020, 1:53 p.m. OK Java 8 TESTS 70 155 28979200 2000
79884027 MagentaCobra B May 12, 2020, 2:44 p.m. OK Java 8 TESTS 69 156 20787200 2000
79921499 ijxjdjd B May 12, 2020, 8:21 p.m. OK Java 8 TESTS 70 171 20582400 2000
79883975 fetetriste B May 12, 2020, 2:43 p.m. OK Java 8 TESTS 69 171 20582400 2000
80013935 2020akadaver B May 13, 2020, 7:27 p.m. OK Java 8 TESTS 70 171 20787200 2000
79911535 yakamoto B May 12, 2020, 6:02 p.m. OK Kotlin TESTS 70 171 23244800 2000
79836679 Tlatoani B May 12, 2020, 1:02 p.m. OK Kotlin TESTS 69 187 25702400 2000
79859095 koboshi B May 12, 2020, 1:45 p.m. OK Kotlin TESTS 69 218 31641600 2000
79876992 elizarov B May 12, 2020, 2:26 p.m. OK Kotlin TESTS 69 1029 30208000 2000
79869418 mban259 B May 12, 2020, 2:08 p.m. OK Mono C# TESTS 69 155 24064000 2000
79872950 hibatibati B May 12, 2020, 2:16 p.m. OK Mono C# TESTS 69 202 24473600 2000
80611324 vjudge3 B May 18, 2020, 2:28 p.m. OK MS C++ TESTS 70 311 4300800 2000
80264619 Parshvajain25 B May 15, 2020, 9:39 p.m. OK MS C++ 2017 TESTS 70 78 5734400 2000
80403742 need1sword B May 16, 2020, 6:08 p.m. OK MS C++ 2017 TESTS 70 93 3686400 2000
79860703 Seyaua B May 12, 2020, 1:48 p.m. OK MS C++ 2017 TESTS 69 93 4096000 2000
79843977 tarattata1 B May 12, 2020, 1:14 p.m. OK MS C++ 2017 TESTS 69 93 4096000 2000
80306279 Kirill456Z B May 16, 2020, 10:51 a.m. OK MS C++ 2017 TESTS 70 93 4096000 2000
79880070 P___ B May 12, 2020, 2:34 p.m. OK MS C++ 2017 TESTS 69 93 5529600 2000
79860343 pichulia B May 12, 2020, 1:47 p.m. OK MS C++ 2017 TESTS 69 93 6963200 2000
80398766 need1sword B May 16, 2020, 5:12 p.m. OK MS C++ 2017 TESTS 70 108 3686400 2000
80403193 need1sword B May 16, 2020, 6:01 p.m. OK MS C++ 2017 TESTS 70 109 3686400 2000
81690809 getN1ght B May 28, 2020, 9:32 a.m. OK MS C++ 2017 TESTS 70 249 409600 2000
79847686 pajenegod B May 12, 2020, 1:21 p.m. OK PyPy 2 TESTS 69 187 43724800 2000
79903108 MVP B May 12, 2020, 4:38 p.m. OK PyPy 2 TESTS 70 311 31539200 2000
79889374 MVP B May 12, 2020, 2:56 p.m. OK PyPy 2 TESTS 69 326 31539200 2000
79900187 Jonte_98 B May 12, 2020, 4:14 p.m. OK PyPy 2 TESTS 70 499 34611200 2000
79837787 bcollet B May 12, 2020, 1:04 p.m. OK PyPy 2 TESTS 69 1169 38297600 2000
79962624 yzrh B May 13, 2020, 9:17 a.m. OK PyPy 3 TESTS 70 264 33177600 2000
79842463 tamato B May 12, 2020, 1:12 p.m. OK PyPy 3 TESTS 69 296 29388800 2000
80061272 UTMoonlight B May 14, 2020, 11:03 a.m. OK PyPy 3 TESTS 70 296 32153600 2000
79924396 throwawayatcoder B May 12, 2020, 9:18 p.m. OK PyPy 3 TESTS 70 311 30412800 2000
79850220 pineriver B May 12, 2020, 1:26 p.m. OK PyPy 3 TESTS 69 405 30720000 2000
80067443 Sud_geek B May 14, 2020, 12:14 p.m. OK PyPy 3 TESTS 70 436 30822400 2000
80798581 silentone B May 20, 2020, 6:17 p.m. OK PyPy 3 TESTS 70 451 10752000 2000
79925677 apurva3455 B May 12, 2020, 9:51 p.m. OK PyPy 3 TESTS 70 451 30822400 2000
79992394 aberent B May 13, 2020, 2:54 p.m. OK PyPy 3 TESTS 70 451 31129600 2000
80448298 roaris B May 17, 2020, 8:15 a.m. OK PyPy 3 TESTS 70 452 30822400 2000
79897789 nebocco B May 12, 2020, 3:58 p.m. OK Python 3 TESTS 69 530 15667200 2000
80049676 sidchintamaneni B May 14, 2020, 8:46 a.m. OK Python 3 TESTS 70 1060 15564800 2000
80033882 squiggly B May 14, 2020, 5:28 a.m. OK Python 3 TESTS 70 1091 15564800 2000
79941587 someonenoname B May 13, 2020, 4:43 a.m. OK Python 3 TESTS 70 1153 15564800 2000
80196367 vermakunal088 B May 15, 2020, 6:24 a.m. OK Python 3 TESTS 70 1169 15564800 2000
80304117 deeyagupta B May 16, 2020, 10:25 a.m. OK Python 3 TESTS 70 1184 15564800 2000
79906651 Nanored B May 12, 2020, 5:10 p.m. OK Python 3 TESTS 70 1232 15360000 2000
81419892 dragon__knight B May 25, 2020, 8:22 p.m. OK Python 3 TESTS 70 1263 9011200 2000
79903030 LeoRiether B May 12, 2020, 4:37 p.m. OK Rust TESTS 70 46 6758400 2000
79838627 sansen B May 12, 2020, 1:05 p.m. OK Rust TESTS 69 46 10035200 2000
81405858 Roka B May 25, 2020, 5:16 p.m. OK Rust TESTS 70 77 3379200 2000
79853092 darkkcyan B May 12, 2020, 1:32 p.m. OK Rust TESTS 69 77 9728000 2000
79940543 cympfh B May 13, 2020, 4:24 a.m. OK Rust TESTS 70 795 9932800 2000

remove filters

Back to search problems