Educational Codeforces Round 101 (Rated for 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
1469 Educational Codeforces Round 101 (Rated for Div. 2) FINISHED False 7200 128100263 Dec. 28, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 10872 ) C Building a Fence PROGRAMMING dp greedy implementation two pointers

B"You want to build a fence that will consist of n equal sections. All sections have a width equal to 1 and height equal to k . You will place all sections in one line side by side. Unfortunately, the ground beneath the fence is not flat. For simplicity, you can think that the ground level under the i -th section is equal to h_i . You should follow several rules to build the fence: Is it possible to build a fence that meets all rules? The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The first line of each test case contains two integers n and k ( 2 <= n <= 2 cdot 10^5 ; 2 <= k <= 10^8 ) -- the number of sections in the fence and the height of each section. The second line of each test case contains n integers h_1, h_2, ... , h_n ( 0 <= h_i <= 10^8 ), where h_i is the ground level beneath the i -th section. It's guaranteed that the sum of n over test cases doesn't exceed 2 cdot 10^5 . For each test case print YES if it's possible to build the fence that meets all rules. Otherwise, print NO. You may print each letter in any case (for example, YES, Yes, yes, yEs will all be recognized as positive answer). In the first test case, one of the possible fences is shown in the picture. In the second test case, according to the second rule, you should build both sections on the corresponding ground levels, and since k = 3 , h_1 = 0 , and h_2 = 2 the first rule is also fulfilled. In the third test case, according to the second rule, you should build the first section on height 3 and the third section on height 2 . According to the first rule, the second section should be on the height of at least 2 (to have a common side with the first section), but according to the third rule, the second section can be built on the height of at most h_2 + k - 1 = 1 . "...

Tutorials

Educational Codeforces Round 101 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
102636694 niets C Dec. 28, 2020, 6:49 p.m. OK GNU C11 TESTS 8 62 819200
102653226 gxlois C Dec. 29, 2020, 3:20 a.m. OK GNU C11 TESTS 37 93 819200
102630847 Beku.sh C Dec. 28, 2020, 5:32 p.m. OK GNU C11 TESTS 8 124 0
102638353 Rajib_119 C Dec. 28, 2020, 7:15 p.m. OK GNU C++11 TESTS 8 31 819200
102648951 william555 C Dec. 29, 2020, 12:25 a.m. OK GNU C++11 TESTS 37 31 921600
102647523 zjjws C Dec. 28, 2020, 11:16 p.m. OK GNU C++11 TESTS 37 31 1433600
102659898 Lanly C Dec. 29, 2020, 5:50 a.m. OK GNU C++11 TESTS 37 31 1638400
102620959 thecold C Dec. 28, 2020, 4:32 p.m. OK GNU C++11 TESTS 8 31 2252800
102624447 littlechai C Dec. 28, 2020, 4:42 p.m. OK GNU C++11 TESTS 8 31 5734400
102655627 the_xin C Dec. 29, 2020, 4:28 a.m. OK GNU C++11 TESTS 37 46 0
102648000 with C Dec. 28, 2020, 11:38 p.m. OK GNU C++11 TESTS 37 46 819200
102623451 lyyyyy C Dec. 28, 2020, 4:38 p.m. OK GNU C++11 TESTS 8 46 9113600
102649990 zknpy C Dec. 29, 2020, 1:10 a.m. OK GNU C++11 TESTS 37 46 24064000
102631470 rajuputta1080 C Dec. 28, 2020, 5:40 p.m. OK GNU C++14 TESTS 8 62 0
102645988 carre C Dec. 28, 2020, 10:15 p.m. OK GNU C++14 TESTS 37 62 0
102632765 KhaledFarhat C Dec. 28, 2020, 5:55 p.m. OK GNU C++14 TESTS 8 62 0
102646171 Runtime___error C Dec. 28, 2020, 10:22 p.m. OK GNU C++14 TESTS 37 62 0
102650191 nandonathaniel C Dec. 29, 2020, 1:20 a.m. OK GNU C++14 TESTS 37 62 819200
102640913 Nayem12005 C Dec. 28, 2020, 8:01 p.m. OK GNU C++14 TESTS 37 62 819200
102629403 Soren_15 C Dec. 28, 2020, 5:16 p.m. OK GNU C++14 TESTS 8 62 819200
102658116 Yash_mittal2409 C Dec. 29, 2020, 5:20 a.m. OK GNU C++14 TESTS 37 62 819200
102656619 practice_ C Dec. 29, 2020, 4:51 a.m. OK GNU C++14 TESTS 37 62 819200
102658140 ManojSharma C Dec. 29, 2020, 5:20 a.m. OK GNU C++14 TESTS 37 62 819200
102627140 Simones C Dec. 28, 2020, 4:57 p.m. OK GNU C++17 TESTS 8 61 819200
102659153 advgr1997 C Dec. 29, 2020, 5:37 a.m. OK GNU C++17 TESTS 37 61 2355200
102634214 TheLurkingStarman C Dec. 28, 2020, 6:14 p.m. OK GNU C++17 TESTS 8 62 0
102640585 MartiM C Dec. 28, 2020, 7:54 p.m. OK GNU C++17 TESTS 37 62 819200
102639940 CrazyMurky C Dec. 28, 2020, 7:42 p.m. OK GNU C++17 TESTS 8 62 819200
102635719 123sadkek C Dec. 28, 2020, 6:34 p.m. OK GNU C++17 TESTS 8 62 819200
102633062 dusangradojevic C Dec. 28, 2020, 5:59 p.m. OK GNU C++17 TESTS 8 62 819200
102656517 n_eha93 C Dec. 29, 2020, 4:48 a.m. OK GNU C++17 TESTS 37 62 819200
102645488 Gandji C Dec. 28, 2020, 9:56 p.m. OK GNU C++17 TESTS 37 62 819200
102654760 Prababamaba C Dec. 29, 2020, 4:04 a.m. OK GNU C++17 TESTS 37 62 819200
102628570 Harshlyn94 C Dec. 28, 2020, 5:08 p.m. OK GNU C++17 (64) TESTS 8 46 0
102623859 syawl-1017 C Dec. 28, 2020, 4:39 p.m. OK GNU C++17 (64) TESTS 8 46 819200
102639233 N_o_o_B C Dec. 28, 2020, 7:30 p.m. OK GNU C++17 (64) TESTS 8 46 819200
102660132 MayankGusain C Dec. 29, 2020, 5:53 a.m. OK GNU C++17 (64) TESTS 37 46 819200
102645935 AnandOza C Dec. 28, 2020, 10:13 p.m. OK GNU C++17 (64) TESTS 37 46 819200
102643647 InojosaCS C Dec. 28, 2020, 9:04 p.m. OK GNU C++17 (64) TESTS 37 46 819200
102639729 G0ingInsqne C Dec. 28, 2020, 7:39 p.m. OK GNU C++17 (64) TESTS 8 46 819200
102636560 ankurkayal C Dec. 28, 2020, 6:46 p.m. OK GNU C++17 (64) TESTS 8 46 819200
102629864 erray C Dec. 28, 2020, 5:21 p.m. OK GNU C++17 (64) TESTS 8 46 819200
102629765 hello_codeforces C Dec. 28, 2020, 5:20 p.m. OK GNU C++17 (64) TESTS 8 46 819200
102629043 it_vineh_ C Dec. 28, 2020, 5:13 p.m. OK Java 11 TESTS 8 187 0
102632785 albertc100 C Dec. 28, 2020, 5:55 p.m. OK Java 11 TESTS 8 218 0
102660364 SaberXpro C Dec. 29, 2020, 5:57 a.m. OK Java 11 TESTS 37 218 0
102650765 Siddharth2020 C Dec. 29, 2020, 1:46 a.m. OK Java 11 TESTS 37 218 0
102647995 bittubittu C Dec. 28, 2020, 11:38 p.m. OK Java 11 TESTS 37 218 0
102637258 RuthlessAggression C Dec. 28, 2020, 6:57 p.m. OK Java 11 TESTS 8 218 0
102635567 coderrohan14 C Dec. 28, 2020, 6:32 p.m. OK Java 11 TESTS 8 218 0
102630530 kostasanemozalis C Dec. 28, 2020, 5:29 p.m. OK Java 11 TESTS 8 218 0
102630565 KhanhNguyenn C Dec. 28, 2020, 5:29 p.m. OK Java 11 TESTS 8 233 0
102626728 Relief C Dec. 28, 2020, 4:54 p.m. OK Java 11 TESTS 8 233 0
102635813 revanthreddy85 C Dec. 28, 2020, 6:36 p.m. OK Java 8 TESTS 8 124 0
102625253 ineffablekenobi C Dec. 28, 2020, 4:46 p.m. OK Java 8 TESTS 8 124 0
102656598 Pranay2516 C Dec. 29, 2020, 4:50 a.m. OK Java 8 TESTS 37 139 0
102652116 2020akadaver C Dec. 29, 2020, 2:40 a.m. OK Java 8 TESTS 37 155 1945600
102652201 MagentaCobra C Dec. 29, 2020, 2:43 a.m. OK Java 8 TESTS 37 155 2969600
102620230 honeysingh18 C Dec. 28, 2020, 4:30 p.m. OK Java 8 TESTS 8 155 2969600
102621813 NatInTheHat C Dec. 28, 2020, 4:33 p.m. OK Java 8 TESTS 8 155 3072000
102627989 pulkit1411 C Dec. 28, 2020, 5:03 p.m. OK Java 8 TESTS 8 155 33587200
102636111 obsessed_titan C Dec. 28, 2020, 6:40 p.m. OK Java 8 TESTS 8 156 1945600
102628882 GoogleMe C Dec. 28, 2020, 5:11 p.m. OK Java 8 TESTS 8 171 1945600
102652392 Spheniscine C Dec. 29, 2020, 2:52 a.m. OK Kotlin TESTS 37 140 0
102659967 ThinkingDobby C Dec. 29, 2020, 5:51 a.m. OK Kotlin TESTS 37 171 6348800
102634220 SergeyMalenkov C Dec. 28, 2020, 6:14 p.m. OK Kotlin TESTS 8 280 15974400
102641734 CepGamer C Dec. 28, 2020, 8:17 p.m. OK Kotlin TESTS 37 514 1740800
102621778 DonoToT C Dec. 28, 2020, 4:33 p.m. OK MS C++ 2017 TESTS 8 78 1638400
102652252 jongwook123 C Dec. 29, 2020, 2:46 a.m. OK MS C++ 2017 TESTS 37 187 2355200
102619085 charmander3333 C Dec. 28, 2020, 4:28 p.m. OK MS C++ 2017 TESTS 8 187 3174400
102648615 hruif C Dec. 29, 2020, 12:09 a.m. OK MS C++ 2017 TESTS 37 202 819200
102641948 AntonKozhevnikov C Dec. 28, 2020, 8:22 p.m. OK MS C++ 2017 TESTS 37 217 819200
102657000 strange-corner C Dec. 29, 2020, 4:58 a.m. OK MS C++ 2017 TESTS 37 218 819200
102625153 WCmidschool C Dec. 28, 2020, 4:45 p.m. OK MS C++ 2017 TESTS 8 218 2457600
102648829 EvgeniusASPX C Dec. 29, 2020, 12:19 a.m. OK MS C++ 2017 TESTS 37 218 7987200
102645925 gever_gever C Dec. 28, 2020, 10:13 p.m. OK MS C++ 2017 TESTS 37 233 7372800
102628501 DarkOverlord999 C Dec. 28, 2020, 5:08 p.m. OK PyPy 3 TESTS 8 327 15257600
102633520 reddevil100 C Dec. 28, 2020, 6:04 p.m. OK PyPy 3 TESTS 8 342 16076800
102627599 beriefing C Dec. 28, 2020, 5 p.m. OK PyPy 3 TESTS 8 342 22016000
102641019 upadhyay.aaditya2001 C Dec. 28, 2020, 8:03 p.m. OK PyPy 3 TESTS 37 358 14950400
102620170 wdyk70825 C Dec. 28, 2020, 4:30 p.m. OK PyPy 3 TESTS 8 358 16281600
102620193 InvalidSyntax C Dec. 28, 2020, 4:30 p.m. OK PyPy 3 TESTS 8 373 14745600
102621710 PrasannaB C Dec. 28, 2020, 4:33 p.m. OK PyPy 3 TESTS 8 389 14745600
102646946 samchen123 C Dec. 28, 2020, 10:52 p.m. OK PyPy 3 TESTS 37 389 14950400
102633444 Munchy_1 C Dec. 28, 2020, 6:03 p.m. OK PyPy 3 TESTS 8 389 14950400
102638341 KevinyWu C Dec. 28, 2020, 7:15 p.m. OK PyPy 3 TESTS 8 389 15155200
102648457 ComptineDunAutreEte C Dec. 29, 2020, 12:01 a.m. OK Python 2 TESTS 37 389 11059200
102638305 _DontGiveUp_ C Dec. 28, 2020, 7:14 p.m. OK Python 2 TESTS 8 452 11878400
102625209 orazbek C Dec. 28, 2020, 4:46 p.m. OK Python 3 TESTS 8 327 15667200
102628477 shwjain89 C Dec. 28, 2020, 5:07 p.m. OK Python 3 TESTS 8 373 15769600
102625302 B1ts C Dec. 28, 2020, 4:46 p.m. OK Python 3 TESTS 8 373 15769600
102652191 yum C Dec. 29, 2020, 2:43 a.m. OK Python 3 TESTS 37 436 15769600
102633964 arpit0891 C Dec. 28, 2020, 6:11 p.m. OK Python 3 TESTS 8 436 15769600
102632814 sh1194 C Dec. 28, 2020, 5:55 p.m. OK Python 3 TESTS 8 436 15769600
102652442 red_knife C Dec. 29, 2020, 2:54 a.m. OK Python 3 TESTS 37 467 17100800
102626206 swapnilagarwal2001 C Dec. 28, 2020, 4:51 p.m. OK Python 3 TESTS 8 482 15667200
102629890 caow C Dec. 28, 2020, 5:21 p.m. OK Python 3 TESTS 8 483 16691200
102646524 yinuowang C Dec. 28, 2020, 10:35 p.m. OK Python 3 TESTS 37 498 15872000
102629550 optozorax C Dec. 28, 2020, 5:18 p.m. OK Rust TESTS 8 77 3174400

remove filters

Back to search problems