Educational Codeforces Round 126 (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
1661 Educational Codeforces Round 126 (Rated for Div. 2) FINISHED False 7200 87665063 April 9, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4851 ) D Progressions Covering PROGRAMMING data structures greedy implementation

B"You are given two arrays: an array a consisting of n zeros and an array b consisting of n integers. You can apply the following operation to the array a an arbitrary number of times: choose some subsegment of a of length k and add the arithmetic progression 1, 2, ldots, k to this subsegment -- i. xe2 x80 x89e. add 1 to the first element of the subsegment, 2 to the second element, and so on. The chosen subsegment should be inside the borders of the array a (i.e., if the left border of the chosen subsegment is l , then the condition 1 <= l <= l + k - 1 <= n should be satisfied). Note that the progression added is always 1, 2, ldots, k but not the k, k - 1, ldots, 1 or anything else (i.e., the leftmost element of the subsegment always increases by 1 , the second element always increases by 2 and so on). Your task is to find the minimum possible number of operations required to satisfy the condition a_i ge b_i for each i from 1 to n . Note that the condition a_i ge b_i should be satisfied for all elements at once. The first line of the input contains two integers n and k ( 1 <= k <= n <= 3 cdot 10^5 ) -- the number of elements in both arrays and the length of the subsegment, respectively. The second line of the input contains n integers b_1, b_2, ldots, b_n ( 1 <= b_i <= 10^{12} ), where b_i is the i -th element of the array b . Print one integer -- the minimum possible number of operations required to satisfy the condition a_i ge b_i for each i from 1 to n . Consider the first example. In this test, we don't really have any choice, so we need to add at least five progressions to make the first element equals 5 . The array a becomes [5, 10, 15] . Consider the second example. In this test, let's add one progression on the segment [1; 3]"...

Tutorials

Educational Codeforces Round 126 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
153241949 kakooda D April 9, 2022, 9:27 p.m. OK FPC TESTS 56 124 4812800
153218235 jin-chenghou D April 9, 2022, 4:32 p.m. OK GNU C++14 TESTS 56 46 14540800
153222600 WangXiaoming_Fast_Food D April 9, 2022, 4:53 p.m. OK GNU C++14 TESTS 56 109 4812800
153254765 jucason_xu D April 10, 2022, 3:42 a.m. OK GNU C++14 TESTS 56 109 4812800
153227727 illume2021 D April 9, 2022, 5:45 p.m. OK GNU C++14 TESTS 56 109 4812800
153225379 BogdanG__G D April 9, 2022, 5:18 p.m. OK GNU C++14 TESTS 56 109 4812800
153255914 araragi_koyo D April 10, 2022, 4:08 a.m. OK GNU C++14 TESTS 56 109 5120000
153244431 wrc D April 9, 2022, 10:31 p.m. OK GNU C++14 TESTS 56 109 7168000
153218529 pollax D April 9, 2022, 4:33 p.m. OK GNU C++14 TESTS 56 109 7270400
153228672 toxicovi D April 9, 2022, 5:56 p.m. OK GNU C++14 TESTS 56 109 7270400
153227597 shitmaster D April 9, 2022, 5:43 p.m. OK GNU C++14 TESTS 56 109 7270400
153213636 windy7926778 D April 9, 2022, 4:21 p.m. OK GNU C++17 TESTS 56 93 4812800
153211945 andrei6184 D April 9, 2022, 4:16 p.m. OK GNU C++17 TESTS 56 109 7680000
153213318 induk_v_tsiane D April 9, 2022, 4:20 p.m. OK GNU C++17 TESTS 56 109 9932800
153255282 csgrandeur D April 10, 2022, 3:54 a.m. OK GNU C++17 TESTS 56 124 4812800
153261195 xenofil D April 10, 2022, 5:35 a.m. OK GNU C++17 TESTS 56 124 4812800
153260827 ashraful9194 D April 10, 2022, 5:31 a.m. OK GNU C++17 TESTS 56 124 4812800
153260392 sirius08 D April 10, 2022, 5:26 a.m. OK GNU C++17 TESTS 56 124 4812800
153259580 heisenberg66 D April 10, 2022, 5:16 a.m. OK GNU C++17 TESTS 56 124 4812800
153255937 DoorKickers D April 10, 2022, 4:08 a.m. OK GNU C++17 TESTS 56 124 4812800
153253709 karemo D April 10, 2022, 3:15 a.m. OK GNU C++17 TESTS 56 124 4812800
153217981 rgcp D April 9, 2022, 4:32 p.m. OK GNU C++17 (64) TESTS 56 77 4812800
153253131 keeping_running D April 10, 2022, 3:02 a.m. OK GNU C++17 (64) TESTS 56 77 4812800
153251674 flowerletter D April 10, 2022, 2:24 a.m. OK GNU C++17 (64) TESTS 56 77 4812800
153221871 ei133333 D April 9, 2022, 4:48 p.m. OK GNU C++17 (64) TESTS 56 77 4812800
153221107 hamray D April 9, 2022, 4:43 p.m. OK GNU C++17 (64) TESTS 56 77 4812800
153216844 maxcruickshanks D April 9, 2022, 4:29 p.m. OK GNU C++17 (64) TESTS 56 77 7270400
153223345 Dog_food_is_me D April 9, 2022, 4:59 p.m. OK GNU C++17 (64) TESTS 56 77 7372800
153255136 lemongrab D April 10, 2022, 3:50 a.m. OK GNU C++17 (64) TESTS 56 77 7884800
153215543 retiredd D April 9, 2022, 4:26 p.m. OK GNU C++17 (64) TESTS 56 77 9625600
153211966 DaddyCool_69 D April 9, 2022, 4:16 p.m. OK GNU C++17 (64) TESTS 56 77 9625600
153254131 OvOrz D April 10, 2022, 3:26 a.m. OK GNU C++20 (64) TESTS 56 46 4812800
153254160 Msstt D April 10, 2022, 3:27 a.m. OK GNU C++20 (64) TESTS 56 61 4812800
153220619 silxi D April 9, 2022, 4:41 p.m. OK GNU C++20 (64) TESTS 56 61 5324800
153257940 menborong D April 10, 2022, 4:45 a.m. OK GNU C++20 (64) TESTS 56 62 3788800
153260318 AndreyPavlov D April 10, 2022, 5:25 a.m. OK GNU C++20 (64) TESTS 56 62 4812800
153263140 aniket_kundu D April 10, 2022, 5:59 a.m. OK GNU C++20 (64) TESTS 56 62 4812800
153260558 AndreyPavlov D April 10, 2022, 5:28 a.m. OK GNU C++20 (64) TESTS 56 62 4812800
153257671 TimeWarp101 D April 10, 2022, 4:41 a.m. OK GNU C++20 (64) TESTS 56 62 4812800
153256246 Youling_wang D April 10, 2022, 4:14 a.m. OK GNU C++20 (64) TESTS 56 62 4812800
153253564 Rinors D April 10, 2022, 3:11 a.m. OK GNU C++20 (64) TESTS 56 62 4812800
153224728 LXL D April 9, 2022, 5:11 p.m. OK Go TESTS 56 265 10137600
153256463 red_right_hand69 D April 10, 2022, 4:19 a.m. OK Java 11 TESTS 56 217 0
153225223 mbfeci D April 9, 2022, 5:16 p.m. OK Java 11 TESTS 56 249 7372800
153239344 MatthewRaker D April 9, 2022, 8:34 p.m. OK Java 11 TESTS 56 296 18841600
153216206 zoro_hiyori D April 9, 2022, 4:28 p.m. OK Java 11 TESTS 56 311 23552000
153211249 Khater D April 9, 2022, 4:15 p.m. OK Java 11 TESTS 56 1965 81305600
153214540 jonsnow7 D April 9, 2022, 4:23 p.m. OK Java 8 TESTS 56 140 0
153220884 adi_7861 D April 9, 2022, 4:42 p.m. OK Java 8 TESTS 56 171 115507200
153211378 JunBinLiang D April 9, 2022, 4:15 p.m. OK Java 8 TESTS 56 280 35123200
153228472 priyaroy3370 D April 9, 2022, 5:54 p.m. OK Java 8 TESTS 56 607 614400
153228129 arvindf232 D April 9, 2022, 5:50 p.m. OK Kotlin 1.4 TESTS 56 140 0
153221602 Alexey D April 9, 2022, 4:46 p.m. OK MS C++ 2017 TESTS 56 358 4812800
153215663 Tdyx D April 9, 2022, 4:26 p.m. OK .NET Core C# TESTS 56 171 37580800
153232088 acorn11 D April 9, 2022, 6:43 p.m. OK PyPy 2 TESTS 56 436 42803200
153221174 1_2_3_4_5_9 D April 9, 2022, 4:44 p.m. OK PyPy 2 TESTS 56 592 73011200
153214171 14_15_16 D April 9, 2022, 4:22 p.m. OK PyPy 2 TESTS 56 592 73011200
153230116 hxu10 D April 9, 2022, 6:17 p.m. OK PyPy 3 TESTS 56 405 51507200
153239806 hxu10 D April 9, 2022, 8:42 p.m. OK PyPy 3 TESTS 56 436 51507200
153217382 Navier_boltzmann D April 9, 2022, 4:31 p.m. OK PyPy 3 TESTS 56 670 43622400
153214133 sushmanth.dampur8780 D April 9, 2022, 4:22 p.m. OK PyPy 3 TESTS 56 904 58265600
153257856 ChitreshApte D April 10, 2022, 4:44 a.m. OK PyPy 3 TESTS 56 904 58368000
153220688 titia D April 9, 2022, 4:41 p.m. OK PyPy 3 TESTS 56 1091 100044800
153228106 codicon D April 9, 2022, 5:49 p.m. OK PyPy 3-64 TESTS 56 171 48230400
153246860 legend.ary_as D April 9, 2022, 11:54 p.m. OK PyPy 3-64 TESTS 56 202 50278400
153257058 skhan_org D April 10, 2022, 4:30 a.m. OK PyPy 3-64 TESTS 56 217 51404800
153213470 alexwice D April 9, 2022, 4:20 p.m. OK PyPy 3-64 TESTS 56 233 50585600
153258042 huangxw D April 10, 2022, 4:46 a.m. OK PyPy 3-64 TESTS 56 233 53043200
153222093 huangxw D April 9, 2022, 4:50 p.m. OK PyPy 3-64 TESTS 56 233 53760000
153225705 huangxw D April 9, 2022, 5:22 p.m. OK PyPy 3-64 TESTS 56 234 51916800
153241791 uttharapally.chandra D April 9, 2022, 9:24 p.m. OK PyPy 3-64 TESTS 56 436 48435200
153232285 DBabichev D April 9, 2022, 6:46 p.m. OK PyPy 3-64 TESTS 56 452 37785600
153246042 unknownSolver D April 9, 2022, 11:23 p.m. OK PyPy 3-64 TESTS 56 452 44441600
153255786 alonforces D April 10, 2022, 4:05 a.m. OK Python 3 TESTS 56 546 27238400
153225204 togatoga D April 9, 2022, 5:16 p.m. OK Rust 2021 TESTS 56 77 34304000
153252365 sansen D April 10, 2022, 2:42 a.m. OK Rust 2021 TESTS 56 311 55091200

remove filters

Back to search problems