Educational Codeforces Round 40 (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
954 Educational Codeforces Round 40 (Rated for Div. 2) FINISHED False 10800 254793284 March 22, 2018, 6:05 a.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 2395 ) G Castle Defense PROGRAMMING binary search data structures greedy two pointers 2100

Today you are going to lead a group of elven archers to defend the castle that is attacked by an army of angry orcs. Three sides of the castle are protected by impassable mountains and the remaining side is occupied by a long wall that is split into n sections. At this moment there are exactly a i archers located at the i -th section of this wall. You know that archer who stands at section i can shoot orcs that attack section located at distance not exceeding r , that is all such sections j that | i - j | ≤ r . In particular, r = 0 means that archers are only capable of shooting at orcs who attack section i . Denote as defense level of section i the total number of archers who can shoot at the orcs attacking this section. Reliability of the defense plan is the minimum value of defense level of individual wall section. There is a little time left till the attack so you can't redistribute archers that are already located at the wall. However, there is a reserve of k archers that you can distribute among wall sections in arbitrary way. You would like to achieve maximum possible reliability of the defence plan. The first line of the input contains three integers n , r and k ( 1 ≤ n ≤ 500 000 , 0 ≤ r ≤ n , 0 ≤ k ≤ 10 18 ) — the number of sections of the wall, the maximum distance to other section archers can still shoot and the number of archers yet to be distributed along the wall. The second line contains n integers a 1 , a 2 , ..., a n ( 0 ≤ a i ≤ 10 9 ) — the current number of archers at each section. Print one integer — the maximum possible value of defense plan reliability, i.e. the maximum possible value of minimum defense level if we distribute k additional archers optimally.

Tutorials

58519

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
36498873 libra9z G March 22, 2018, 11:11 a.m. OK D TESTS 50 607 20377600 2100
57630460 vjudge1 G July 24, 2019, 8:34 a.m. OK FPC TESTS 50 358 7987200 2100
57639656 vjudge2 G July 24, 2019, 12:11 p.m. OK FPC TESTS 50 436 24064000 2100
36572245 slavik228 G March 24, 2018, 11:20 a.m. OK FPC TESTS 50 452 27136000 2100
40932639 ReaLNero1 G July 30, 2018, 1:56 a.m. OK GNU C++ TESTS 50 218 7987200 2100
37487433 Scut82 G April 20, 2018, 12:47 p.m. OK GNU C++ TESTS 50 233 11878400 2100
36494476 hhhwsqhhh G March 22, 2018, 9:03 a.m. OK GNU C++ TESTS 50 264 15564800 2100
41424141 luogu_bot3 G Aug. 10, 2018, 8:28 a.m. OK GNU C++ TESTS 50 265 8294400 2100
37482365 Scut82 G April 20, 2018, 9:44 a.m. OK GNU C++ TESTS 50 265 11673600 2100
41902289 vjudge3 G Aug. 20, 2018, 12:49 p.m. OK GNU C++ TESTS 50 265 21913600 2100
42443933 vjudge5 G Sept. 4, 2018, 12:40 a.m. OK GNU C++ TESTS 50 280 8089600 2100
37290764 vjudge3 G April 13, 2018, 4:09 p.m. OK GNU C++ TESTS 50 280 9523200 2100
36534435 bdzxt G March 23, 2018, 3:04 p.m. OK GNU C++ TESTS 50 280 11571200 2100
36506361 vjudge1 G March 22, 2018, 2:34 p.m. OK GNU C++ TESTS 50 280 11571200 2100
52311532 rainboy G April 4, 2019, 2:51 p.m. OK GNU C11 TESTS 50 218 16076800 2100
42104907 weskerhluffy G Aug. 25, 2018, 10:53 p.m. OK GNU C11 TESTS 50 498 10035200 2100
47267303 vjudge4 G Dec. 19, 2018, 2:54 p.m. OK GNU C++11 TESTS 50 187 7987200 2100
57937557 Haworthia G July 29, 2019, 11:22 a.m. OK GNU C++11 TESTS 50 217 12083200 2100
57937587 Haworthia G July 29, 2019, 11:23 a.m. OK GNU C++11 TESTS 50 233 11980800 2100
43235004 LJZ_C G Sept. 22, 2018, 7:45 a.m. OK GNU C++11 TESTS 50 234 7987200 2100
36523636 chenyeyuan G March 23, 2018, 7:41 a.m. OK GNU C++11 TESTS 50 234 13619200 2100
57641810 luogu_bot3 G July 24, 2019, 12:52 p.m. OK GNU C++11 TESTS 50 234 120217600 2100
57641801 vjudge3 G July 24, 2019, 12:52 p.m. OK GNU C++11 TESTS 50 234 120217600 2100
43235131 vjudge4 G Sept. 22, 2018, 7:47 a.m. OK GNU C++11 TESTS 50 249 7987200 2100
62389849 onestep G Oct. 12, 2019, 12:43 a.m. OK GNU C++11 TESTS 50 249 7987200 2100
57743299 luogu_bot1 G July 25, 2019, 12:10 p.m. OK GNU C++11 TESTS 50 249 11980800 2100
57740760 vjudge2 G July 25, 2019, 11:23 a.m. OK GNU C++14 TESTS 50 280 12083200 2100
57723860 vjudge5 G July 25, 2019, 6:31 a.m. OK GNU C++14 TESTS 50 295 15564800 2100
36512001 Mamedov G March 22, 2018, 6:03 p.m. OK GNU C++14 TESTS 50 296 27443200 2100
45900823 Hugh_Locke G Nov. 18, 2018, 4:35 a.m. OK GNU C++14 TESTS 50 311 7987200 2100
63250398 zerotohero G Oct. 23, 2019, 3:51 p.m. OK GNU C++14 TESTS 50 311 10035200 2100
57732097 vjudge2 G July 25, 2019, 8:52 a.m. OK GNU C++14 TESTS 50 311 12083200 2100
56859965 capsule G July 11, 2019, 9:12 p.m. OK GNU C++14 TESTS 50 311 12083200 2100
36514772 WhaleVomit G March 22, 2018, 8:07 p.m. OK GNU C++14 TESTS 50 311 15360000 2100
49550503 Shinbai G Feb. 7, 2019, 5:26 a.m. OK GNU C++14 TESTS 50 311 24064000 2100
46133120 vjudge1 G Nov. 24, 2018, 3:21 a.m. OK GNU C++14 TESTS 50 312 7987200 2100
52150997 vjudge4 G April 1, 2019, 11:37 a.m. OK GNU C++17 TESTS 50 265 7987200 2100
58016620 Phortox G July 30, 2019, 3:38 p.m. OK GNU C++17 TESTS 50 265 10035200 2100
52888718 Arpa G April 17, 2019, 6:48 a.m. OK GNU C++17 TESTS 50 265 11980800 2100
52899467 Arpa G April 17, 2019, 10:31 a.m. OK GNU C++17 TESTS 50 265 12083200 2100
49354434 IIeJlMeHb G Feb. 2, 2019, 10:20 a.m. OK GNU C++17 TESTS 50 296 6246400 2100
52150807 Bohoty G April 1, 2019, 11:33 a.m. OK GNU C++17 TESTS 50 296 7987200 2100
54564931 doped.silicon G May 24, 2019, 3:52 p.m. OK GNU C++17 TESTS 50 296 7987200 2100
47701225 UminchuR G Dec. 29, 2018, 4:50 p.m. OK GNU C++17 TESTS 50 296 10035200 2100
44524651 Quasrain G Oct. 19, 2018, 12:45 a.m. OK GNU C++17 TESTS 50 312 36352000 2100
60741028 kostia244 G Sept. 17, 2019, 8:05 p.m. OK GNU C++17 TESTS 50 327 7987200 2100
64205205 vjudge3 G Nov. 4, 2019, 12:40 p.m. OK Go TESTS 50 654 32153600 2100
64205136 WangJialei G Nov. 4, 2019, 12:39 p.m. OK Go TESTS 50 654 32153600 2100
67278287 APM28 G Dec. 20, 2019, 11:03 a.m. OK Java 11 TESTS 50 592 233164800 2100
67270932 APM28 G Dec. 20, 2019, 8:17 a.m. OK Java 11 TESTS 50 623 233164800 2100
67270470 APM28 G Dec. 20, 2019, 8:03 a.m. OK Java 11 TESTS 50 639 233164800 2100
36568485 dalt G March 24, 2018, 8:43 a.m. OK Java 8 TESTS 50 389 25190400 2100
49634769 codefield G Feb. 8, 2019, 6:07 p.m. OK Java 8 TESTS 50 389 37478400 2100
39025910 aman28rwt G June 7, 2018, 3:40 p.m. OK Java 8 TESTS 50 421 2969600 2100
37231287 U_Square G April 11, 2018, 5:30 p.m. OK Java 8 TESTS 50 436 25190400 2100
36520019 Maulik_Patel G March 23, 2018, 4:20 a.m. OK Java 8 TESTS 50 452 26214400 2100
49671890 wadissimo G Feb. 9, 2019, 5:24 p.m. OK Java 8 TESTS 50 467 37478400 2100
49634763 codefield G Feb. 8, 2019, 6:06 p.m. OK Java 8 TESTS 50 467 37478400 2100
52311533 Dukkha G April 4, 2019, 2:51 p.m. OK Java 8 TESTS 50 467 55808000 2100
64568932 yaoct G Nov. 9, 2019, 8:30 a.m. OK Java 8 TESTS 50 498 43315200 2100
41377482 ViciousCoder G Aug. 8, 2018, 10:32 p.m. OK Java 8 TESTS 50 499 0 2100
46577450 vjudge1 G Dec. 4, 2018, 9:27 a.m. OK MS C++ TESTS 50 280 7987200 2100
36731194 RCG G March 29, 2018, 7:12 p.m. OK MS C++ TESTS 50 311 13824000 2100
57623059 vjudge4 G July 24, 2019, 5:52 a.m. OK MS C++ TESTS 50 312 7987200 2100
46151462 vjudge5 G Nov. 24, 2018, 7:58 a.m. OK MS C++ TESTS 50 312 7987200 2100
38559094 vjudge4 G May 23, 2018, 10:52 a.m. OK MS C++ TESTS 50 312 8294400 2100
44487047 vjudge3 G Oct. 18, 2018, 1 p.m. OK MS C++ TESTS 50 312 16076800 2100
46111167 vjudge2 G Nov. 23, 2018, 12:18 p.m. OK MS C++ TESTS 50 327 7987200 2100
46108773 vjudge3 G Nov. 23, 2018, 11:04 a.m. OK MS C++ TESTS 50 327 11980800 2100
48445912 vjudge3 G Jan. 16, 2019, 7:28 a.m. OK MS C++ TESTS 50 342 32051200 2100
57349153 vjudge5 G July 20, 2019, 2:15 a.m. OK MS C++ TESTS 50 343 12083200 2100
57659698 System_Y G July 24, 2019, 3 p.m. OK MS C++ 2017 TESTS 50 373 32051200 2100
59795791 INight G Aug. 31, 2019, 8:36 a.m. OK MS C++ 2017 TESTS 50 389 24064000 2100
59795963 vjudge3 G Aug. 31, 2019, 8:39 a.m. OK MS C++ 2017 TESTS 50 390 24064000 2100
57638898 vjudge5 G July 24, 2019, 11:55 a.m. OK MS C++ 2017 TESTS 50 436 9625600 2100
57637758 vjudge4 G July 24, 2019, 11:28 a.m. OK MS C++ 2017 TESTS 50 545 48128000 2100
54695438 pajenegod G May 26, 2019, 6:50 p.m. OK PyPy 2 TESTS 50 998 71782400 2100

remove filters

Back to search problems