Educational Codeforces Round 143 (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
1795 Educational Codeforces Round 143 (Rated for Div. 2) FINISHED False 7200 60621863 Feb. 16, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2107 ) E Explosions? PROGRAMMING binary search data structures dp math

B'You are playing yet another game where you kill monsters using magic spells. There are n cells in the row, numbered from 1 to n . Initially, the i -th cell contains the i -th monster with h_i health. You have a basic spell that costs 1 MP and deals 1 damage to the monster you choose. You can cast it any number of times. Also, you have a special scroll with "Explosion" spell you can use only once. You want to finish killing monsters with explosion, that 's why you, firstly, cast the basic spell several times (possibly, zero), and then after that, you cast one "Explosion". How does "Explosion" spell work? Firstly, you choose the power of the spell: if you pour x MP into it, "Explosion" will deal x damage. Secondly, you choose some monster i , which will be targeted by the spell. That 's what happens next: Your goal is to kill all the remaining monsters with those "chaining" explosions, that 's why you need a basic spell to decrease h_i of some monsters or even kill them beforehand (monsters die when their current health h_i becomes less or equal to zero). Note that monsters don 't move between cells, so, for example, monsters i and i + 2 will never become neighbors. What is the minimum total MP you need to kill all monsters in the way you want? The total MP is counted as the sum of the number of basic spells you cast and the power x of explosion scroll you 've chosen. The first line contains one integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The first line of each test case contains the single integer n ( 1 <= n <= 3 cdot 10^5 ) -- the number of cells in the row, i. e. the number of monsters. The second line of each test case contains n integers h_1, h_2, ... , h_n ( 1 <= h_i <= 10^6 ) -- the initial health of the monsters. It 's guaranteed that the sum of n over all test cases doesn 't exceed 3 cdot 10'...

Tutorials

112963

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
193912283 Tdyx E Feb. 16, 2023, 5:12 p.m. OK C# 10 TESTS 12 124 46592000
193917901 LeonidR E Feb. 16, 2023, 6:01 p.m. OK C# 10 TESTS 12 124 61030400
193919866 Liswiera E Feb. 16, 2023, 6:21 p.m. OK C# 10 TESTS 12 155 56115200
193902937 chro4896 E Feb. 16, 2023, 4:29 p.m. OK GNU C11 TESTS 12 109 11980800
193947482 __stick E Feb. 17, 2023, 3:10 a.m. OK GNU C++14 TESTS 12 78 7168000
193896054 CoachDanke E Feb. 16, 2023, 4:11 p.m. OK GNU C++14 TESTS 12 78 8396800
193944877 yxzy E Feb. 17, 2023, 2:02 a.m. OK GNU C++14 TESTS 12 78 8396800
193946189 leihongIongyin E Feb. 17, 2023, 2:37 a.m. OK GNU C++14 TESTS 12 78 10854400
193905956 Absolutey E Feb. 16, 2023, 4:36 p.m. OK GNU C++14 TESTS 12 78 11980800
193908532 Absolutey E Feb. 16, 2023, 4:48 p.m. OK GNU C++14 TESTS 12 78 11980800
193943532 bkifhr7 E Feb. 17, 2023, 1:25 a.m. OK GNU C++14 TESTS 12 78 36044800
193944849 vjudge2 E Feb. 17, 2023, 2:01 a.m. OK GNU C++14 TESTS 12 93 8396800
193908747 nalemy E Feb. 16, 2023, 4:50 p.m. OK GNU C++14 TESTS 12 93 8396800
193947646 zlxFTH E Feb. 17, 2023, 3:13 a.m. OK GNU C++14 TESTS 12 93 8396800
193925344 mohamedeltair E Feb. 16, 2023, 7:24 p.m. OK GNU C++17 TESTS 12 78 7577600
193925709 mohamedeltair E Feb. 16, 2023, 7:29 p.m. OK GNU C++17 TESTS 12 78 7577600
193896032 Aging1986 E Feb. 16, 2023, 4:11 p.m. OK GNU C++17 TESTS 12 78 9216000
193897368 fxfxxxfxx E Feb. 16, 2023, 4:15 p.m. OK GNU C++17 TESTS 12 78 9216000
193911413 marinareda E Feb. 16, 2023, 5:06 p.m. OK GNU C++17 TESTS 12 93 4812800
193902528 ParsaS E Feb. 16, 2023, 4:28 p.m. OK GNU C++17 TESTS 12 93 5734400
193908603 patou E Feb. 16, 2023, 4:49 p.m. OK GNU C++17 TESTS 12 93 8806400
193908772 lotusblume E Feb. 16, 2023, 4:50 p.m. OK GNU C++17 TESTS 12 93 9216000
193942598 SakurakoujiRuna E Feb. 17, 2023, 12:57 a.m. OK GNU C++17 TESTS 12 93 9216000
193900854 orangecalculator E Feb. 16, 2023, 4:24 p.m. OK GNU C++17 TESTS 12 93 9523200
193912345 FredYourMind E Feb. 16, 2023, 5:12 p.m. OK GNU C++17 (64) TESTS 12 31 7168000
193911361 FredYourMind E Feb. 16, 2023, 5:05 p.m. OK GNU C++17 (64) TESTS 12 46 7168000
193912238 FredYourMind E Feb. 16, 2023, 5:11 p.m. OK GNU C++17 (64) TESTS 12 46 8294400
193927316 FatihSolak E Feb. 16, 2023, 7:49 p.m. OK GNU C++17 (64) TESTS 12 61 10342400
193954509 becaido E Feb. 17, 2023, 5:25 a.m. OK GNU C++17 (64) TESTS 12 62 7884800
193902970 gyouzasushi E Feb. 16, 2023, 4:29 p.m. OK GNU C++17 (64) TESTS 12 62 8294400
193943859 SyruLoveNewTechnology E Feb. 17, 2023, 1:33 a.m. OK GNU C++17 (64) TESTS 12 62 8396800
193899773 iamone E Feb. 16, 2023, 4:21 p.m. OK GNU C++17 (64) TESTS 12 62 8396800
193945965 alan8585 E Feb. 17, 2023, 2:32 a.m. OK GNU C++17 (64) TESTS 12 62 10137600
193898753 Ahaooops E Feb. 16, 2023, 4:18 p.m. OK GNU C++17 (64) TESTS 12 62 11878400
193941254 cmk666 E Feb. 17, 2023, 12:18 a.m. OK GNU C++20 (64) TESTS 12 31 9113600
193944294 threethreetwothree E Feb. 17, 2023, 1:46 a.m. OK GNU C++20 (64) TESTS 12 31 17612800
193917165 Lucina E Feb. 16, 2023, 5:54 p.m. OK GNU C++20 (64) TESTS 12 46 4403200
193915080 Lucina E Feb. 16, 2023, 5:35 p.m. OK GNU C++20 (64) TESTS 12 46 5120000
193917121 Lucina E Feb. 16, 2023, 5:54 p.m. OK GNU C++20 (64) TESTS 12 46 5222400
193914779 Lucina E Feb. 16, 2023, 5:32 p.m. OK GNU C++20 (64) TESTS 12 46 5222400
193917017 Lucina E Feb. 16, 2023, 5:53 p.m. OK GNU C++20 (64) TESTS 12 46 6041600
193908471 AmaraMehdi E Feb. 16, 2023, 4:48 p.m. OK GNU C++20 (64) TESTS 12 46 6860800
193948816 Tobo E Feb. 17, 2023, 3:42 a.m. OK GNU C++20 (64) TESTS 12 46 6860800
193903520 ineedwater E Feb. 16, 2023, 4:30 p.m. OK GNU C++20 (64) TESTS 12 46 6860800
193946272 dzhi E Feb. 17, 2023, 2:39 a.m. OK Java 11 TESTS 12 312 12185600
193898897 profchi E Feb. 16, 2023, 4:19 p.m. OK Java 11 TESTS 12 327 15155200
193948934 kit.24.20bec096 E Feb. 17, 2023, 3:45 a.m. OK Java 17 TESTS 12 358 19558400
193901269 knightL E Feb. 16, 2023, 4:25 p.m. OK Java 17 TESTS 12 373 19558400
193897246 Socrates1232 E Feb. 16, 2023, 4:15 p.m. OK Java 8 TESTS 12 311 16998400
193906888 cc4414 E Feb. 16, 2023, 4:40 p.m. OK Java 8 TESTS 12 343 33280000
193910294 codicon E Feb. 16, 2023, 4:59 p.m. OK PyPy 3 TESTS 12 421 46489600
193900466 hxu10 E Feb. 16, 2023, 4:23 p.m. OK PyPy 3 TESTS 12 623 79155200
193897819 h_cubed E Feb. 16, 2023, 4:16 p.m. OK PyPy 3 TESTS 12 1543 88064000
193939804 SoleProprietor E Feb. 16, 2023, 11:34 p.m. OK PyPy 3-64 TESTS 12 171 38297600
193922539 codicon E Feb. 16, 2023, 6:52 p.m. OK PyPy 3-64 TESTS 12 187 44339200
193949907 NINGucas E Feb. 17, 2023, 4:04 a.m. OK PyPy 3-64 TESTS 12 234 48640000
193930394 1_2_3_4_5_9 E Feb. 16, 2023, 8:31 p.m. OK PyPy 3-64 TESTS 12 248 52531200
193908879 ZrjaK E Feb. 16, 2023, 4:50 p.m. OK PyPy 3-64 TESTS 12 249 53760000
193913589 titia E Feb. 16, 2023, 5:22 p.m. OK PyPy 3-64 TESTS 12 249 54476800
193946476 SophieHatter E Feb. 17, 2023, 2:44 a.m. OK PyPy 3-64 TESTS 12 249 55398400
193899610 codicon E Feb. 16, 2023, 4:20 p.m. OK PyPy 3-64 TESTS 12 264 44134400
193925594 SophieHatter E Feb. 16, 2023, 7:27 p.m. OK PyPy 3-64 TESTS 12 545 102297600
193917591 dutin E Feb. 16, 2023, 5:58 p.m. OK Python 3 TESTS 12 1263 20480000
193918093 dutin E Feb. 16, 2023, 6:03 p.m. OK Python 3 TESTS 12 1279 20480000

remove filters

Back to search problems