Educational Codeforces Round 158 (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
1901 Educational Codeforces Round 158 (Rated for Div. 2) FINISHED False 7200 30986699 Nov. 24, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7114 ) D Yet Another Monster Fight PROGRAMMING binary search greedy implementation math

B"Vasya is a sorcerer that fights monsters. Again. There are n monsters standing in a row, the amount of health points of the i -th monster is a_i . Vasya is a very powerful sorcerer who knows many overpowered spells. In this fight, he decided to use a chain lightning spell to defeat all the monsters. Let's see how this spell works. Firstly, Vasya chooses an index i of some monster ( 1 <= i <= n ) and the initial power of the spell x . Then the spell hits monsters exactly n times, one hit per monster. The first target of the spell is always the monster i . For every target except for the first one, the chain lightning will choose a random monster who was not hit by the spell and is adjacent to one of the monsters that already was hit. So, each monster will be hit exactly once. The first monster hit by the spell receives x damage, the second monster receives (x-1) damage, the third receives (x-2) damage, and so on. Vasya wants to show how powerful he is, so he wants to kill all the monsters with a single chain lightning spell. The monster is considered dead if the damage he received is not less than the amount of its health points. On the other hand, Vasya wants to show he doesn't care that much, so he wants to choose the minimum initial power of the spell x such that it kills all monsters, no matter which monster (among those who can get hit) gets hit on each step. Of course, Vasya is a sorcerer, but the amount of calculations required to determine the optimal spell setup is way above his possibilities, so you have to help him find the minimum spell power required to kill all the monsters. Note that Vasya chooses the initial target and the power of the spell, other things should be considered random and Vasya wants to kill all the monsters even in the worst possible scenario. The first line of the input contains one integer n ( 1 <= n <= 3 cdot 10^5 ) -- the number of monsters."...

Tutorials

Educational Codeforces Round 158 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
234110623 dream2023 D Nov. 24, 2023, 4:22 p.m. OK C# 10 TESTS 38 124 34611200
234152428 ksandr1v D Nov. 24, 2023, 9:26 p.m. OK C# 10 TESTS 38 296 25702400
234156942 Gassa D Nov. 24, 2023, 10:54 p.m. OK D TESTS 38 124 13721600
234157163 Gassa D Nov. 24, 2023, 11 p.m. OK D TESTS 38 139 24166400
234120286 NenadDapic D Nov. 24, 2023, 4:46 p.m. OK FPC TESTS 38 78 3686400
234125212 Unk1ndled D Nov. 24, 2023, 5:11 p.m. OK GNU C11 TESTS 38 77 3584000
234112605 SzHeN D Nov. 24, 2023, 4:26 p.m. OK GNU C11 TESTS 38 78 24064000
234113670 KellyWLJ D Nov. 24, 2023, 4:28 p.m. OK GNU C++14 TESTS 38 31 4812800
234165539 hehe012 D Nov. 25, 2023, 2:29 a.m. OK GNU C++14 TESTS 38 62 6041600
234123267 osvarp D Nov. 24, 2023, 5:01 p.m. OK GNU C++14 TESTS 38 77 6963200
234158073 liuyz11 D Nov. 24, 2023, 11:25 p.m. OK GNU C++14 TESTS 38 78 1228800
234111908 Inkyo D Nov. 24, 2023, 4:25 p.m. OK GNU C++14 TESTS 38 92 3584000
234114190 HermEs32 D Nov. 24, 2023, 4:29 p.m. OK GNU C++14 TESTS 38 93 2457600
234113786 935238266 D Nov. 24, 2023, 4:29 p.m. OK GNU C++14 TESTS 38 93 2457600
234165092 usernameson D Nov. 25, 2023, 2:20 a.m. OK GNU C++14 TESTS 38 93 3584000
234173324 Youzhencai D Nov. 25, 2023, 4:34 a.m. OK GNU C++14 TESTS 38 93 3584000
234174270 garvil28 D Nov. 25, 2023, 4:47 a.m. OK GNU C++14 TESTS 38 93 3584000
234125699 Shehuinitiandie D Nov. 24, 2023, 5:14 p.m. OK GNU C++17 TESTS 38 78 2457600
234120594 Matevz D Nov. 24, 2023, 4:47 p.m. OK GNU C++17 TESTS 38 78 3584000
234130649 kapishv D Nov. 24, 2023, 5:49 p.m. OK GNU C++17 TESTS 38 92 3584000
234136448 Vasillia D Nov. 24, 2023, 6:31 p.m. OK GNU C++17 TESTS 38 93 1228800
234134254 thanhan D Nov. 24, 2023, 6:15 p.m. OK GNU C++17 TESTS 38 93 1228800
234159705 icchou233 D Nov. 25, 2023, 12:18 a.m. OK GNU C++17 TESTS 38 93 1228800
234170743 TryAgain5555 D Nov. 25, 2023, 4 a.m. OK GNU C++17 TESTS 38 93 1228800
234175244 sjm150 D Nov. 25, 2023, 4:57 a.m. OK GNU C++17 TESTS 38 93 2150400
234160520 im.priyansh D Nov. 25, 2023, 12:40 a.m. OK GNU C++17 TESTS 38 93 2355200
234177776 Iruri D Nov. 25, 2023, 5:22 a.m. OK GNU C++17 TESTS 38 93 2457600
234163255 shuoxuanli D Nov. 25, 2023, 1:44 a.m. OK GNU C++17 (64) TESTS 38 62 2457600
234122249 lunchbox D Nov. 24, 2023, 4:55 p.m. OK GNU C++17 (64) TESTS 38 62 3584000
234165629 mio-lover D Nov. 25, 2023, 2:31 a.m. OK GNU C++17 (64) TESTS 38 62 3584000
234123926 MrPerson D Nov. 24, 2023, 5:04 p.m. OK GNU C++17 (64) TESTS 38 62 3584000
234161541 Sempr D Nov. 25, 2023, 1:06 a.m. OK GNU C++17 (64) TESTS 38 62 3788800
234121220 Wang_Yuan D Nov. 24, 2023, 4:50 p.m. OK GNU C++17 (64) TESTS 38 62 7168000
234121121 Wang_Yuan D Nov. 24, 2023, 4:49 p.m. OK GNU C++17 (64) TESTS 38 62 7270400
234120190 fullmetal D Nov. 24, 2023, 4:45 p.m. OK GNU C++17 (64) TESTS 38 62 7270400
234166274 _Acerolaorion D Nov. 25, 2023, 2:42 a.m. OK GNU C++17 (64) TESTS 38 62 7270400
234135538 HCPS42 D Nov. 24, 2023, 6:24 p.m. OK GNU C++17 (64) TESTS 38 62 7270400
234125630 Ferrriccc D Nov. 24, 2023, 5:14 p.m. OK GNU C++20 (64) TESTS 38 31 7270400
234124837 ganeid D Nov. 24, 2023, 5:09 p.m. OK GNU C++20 (64) TESTS 38 46 1228800
234155145 Klyaksa D Nov. 24, 2023, 10:14 p.m. OK GNU C++20 (64) TESTS 38 46 1228800
234167949 GOURAB D Nov. 25, 2023, 3:13 a.m. OK GNU C++20 (64) TESTS 38 46 2355200
234145180 oversolver D Nov. 24, 2023, 7:53 p.m. OK GNU C++20 (64) TESTS 38 46 2457600
234140754 NO__OB D Nov. 24, 2023, 7:08 p.m. OK GNU C++20 (64) TESTS 38 46 2457600
234139728 Mahmoud_Martini D Nov. 24, 2023, 6:58 p.m. OK GNU C++20 (64) TESTS 38 46 2457600
234139548 Mahmoud_Martini D Nov. 24, 2023, 6:57 p.m. OK GNU C++20 (64) TESTS 38 46 2457600
234158678 Gorgontes D Nov. 24, 2023, 11:44 p.m. OK GNU C++20 (64) TESTS 38 46 2457600
234165834 str3ss D Nov. 25, 2023, 2:34 a.m. OK GNU C++20 (64) TESTS 38 46 2457600
234163612 lxy_sheep D Nov. 25, 2023, 1:53 a.m. OK Go TESTS 38 140 9932800
234121337 newbornLingling0423 D Nov. 24, 2023, 4:50 p.m. OK Java 11 TESTS 38 592 0
234110290 raktcharita2000 D Nov. 24, 2023, 4:21 p.m. OK Java 11 TESTS 38 1263 25804800
234139229 CutSandstone D Nov. 24, 2023, 6:54 p.m. OK Java 17 TESTS 38 249 4710400
234113010 mpanyavin D Nov. 24, 2023, 4:27 p.m. OK Java 17 TESTS 38 265 11468800
234174016 Liiii D Nov. 25, 2023, 4:43 a.m. OK Java 17 TESTS 38 358 7884800
234117774 BlizGale D Nov. 24, 2023, 4:36 p.m. OK Java 17 TESTS 38 374 31334400
234123403 mapleKing D Nov. 24, 2023, 5:01 p.m. OK Java 17 TESTS 38 670 716800
234110569 rohitshee92 D Nov. 24, 2023, 4:22 p.m. OK Java 17 TESTS 38 717 1024000
234110751 TopCloser D Nov. 24, 2023, 4:22 p.m. OK Java 17 TESTS 38 1715 58777600
234118757 TCchen D Nov. 24, 2023, 4:39 p.m. OK Java 17 TESTS 38 1715 67276800
234163697 frey4 D Nov. 25, 2023, 1:54 a.m. OK Java 21 TESTS 38 358 6041600
234136424 mcrash12 D Nov. 24, 2023, 6:31 p.m. OK Java 21 TESTS 38 389 6144000
234148877 Akash_Sardar D Nov. 24, 2023, 8:36 p.m. OK Java 21 TESTS 38 483 31232000
234114346 110101011 D Nov. 24, 2023, 4:30 p.m. OK Java 8 TESTS 38 124 0
234180685 Sumitsingh7 D Nov. 25, 2023, 5:50 a.m. OK Java 8 TESTS 38 124 5734400
234180143 Sumitsingh7 D Nov. 25, 2023, 5:45 a.m. OK Java 8 TESTS 38 124 5734400
234176861 priyaroy3370 D Nov. 25, 2023, 5:13 a.m. OK Java 8 TESTS 38 139 0
234128770 Khan_2020 D Nov. 24, 2023, 5:35 p.m. OK Java 8 TESTS 38 327 12800000
234111805 MintCat D Nov. 24, 2023, 4:24 p.m. OK Java 8 TESTS 38 701 7884800
234112075 iuxan D Nov. 24, 2023, 4:25 p.m. OK MS C++ 2017 TESTS 38 264 9625600
234174081 nectarl D Nov. 25, 2023, 4:44 a.m. OK MS C++ 2017 TESTS 38 296 7270400
234115479 RabbitPower D Nov. 24, 2023, 4:32 p.m. OK MS C++ 2017 TESTS 38 576 7270400
234141395 ahtoh_ D Nov. 24, 2023, 7:14 p.m. OK Node.js TESTS 38 202 70553600
234110581 olliep D Nov. 24, 2023, 4:22 p.m. OK PyPy 3 TESTS 38 404 25907200
234111580 AR69420 D Nov. 24, 2023, 4:24 p.m. OK PyPy 3 TESTS 38 405 30720000
234118513 mas_sa D Nov. 24, 2023, 4:38 p.m. OK PyPy 3-64 TESTS 38 155 32460800
234113003 azhan0222 D Nov. 24, 2023, 4:27 p.m. OK PyPy 3-64 TESTS 38 155 32460800
234110563 odinluca D Nov. 24, 2023, 4:22 p.m. OK PyPy 3-64 TESTS 38 156 35020800
234158104 zhuk_ann D Nov. 24, 2023, 11:26 p.m. OK PyPy 3-64 TESTS 38 156 35123200
234123585 peb D Nov. 24, 2023, 5:02 p.m. OK PyPy 3-64 TESTS 38 156 43724800
234147982 VidGa D Nov. 24, 2023, 8:24 p.m. OK PyPy 3-64 TESTS 38 170 44646400
234158234 dirac_de D Nov. 24, 2023, 11:29 p.m. OK PyPy 3-64 TESTS 38 170 45670400
234123559 Ayush___ D Nov. 24, 2023, 5:02 p.m. OK PyPy 3-64 TESTS 38 170 45670400
234145827 DarkTemplarDrop D Nov. 24, 2023, 8 p.m. OK PyPy 3-64 TESTS 38 171 35430400
234142404 Nullz D Nov. 24, 2023, 7:24 p.m. OK PyPy 3-64 TESTS 38 171 44236800
234151443 IngaleAnkur10 D Nov. 24, 2023, 9:11 p.m. OK Python 3 TESTS 38 452 40038400
234115484 MenjoyerL D Nov. 24, 2023, 4:32 p.m. OK Python 3 TESTS 38 499 39424000
234109660 Redpanda_x D Nov. 24, 2023, 4:20 p.m. OK Python 3 TESTS 38 654 45568000
234158475 points_engineering D Nov. 24, 2023, 11:38 p.m. OK Ruby 3 TESTS 38 842 74547200
234157361 points_engineering D Nov. 24, 2023, 11:04 p.m. OK Ruby 3 TESTS 38 857 74547200
234158827 points_engineering D Nov. 24, 2023, 11:50 p.m. OK Ruby 3 TESTS 38 1013 72294400
234152162 Ddndelion-boy D Nov. 24, 2023, 9:22 p.m. OK Rust 2021 TESTS 38 30 15052800
234153238 Ddndelion-boy D Nov. 24, 2023, 9:40 p.m. OK Rust 2021 TESTS 38 31 15052800
234152116 Ddndelion-boy D Nov. 24, 2023, 9:21 p.m. OK Rust 2021 TESTS 38 31 15052800
234151935 Ddndelion-boy D Nov. 24, 2023, 9:19 p.m. OK Rust 2021 TESTS 38 31 15052800
234151906 Ddndelion-boy D Nov. 24, 2023, 9:18 p.m. OK Rust 2021 TESTS 38 31 15052800
234150887 Ddndelion-boy D Nov. 24, 2023, 9:02 p.m. OK Rust 2021 TESTS 38 31 15052800
234150763 Ddndelion-boy D Nov. 24, 2023, 9 p.m. OK Rust 2021 TESTS 38 31 15052800
234150481 Ddndelion-boy D Nov. 24, 2023, 8:57 p.m. OK Rust 2021 TESTS 38 31 15052800
234150443 Ddndelion-boy D Nov. 24, 2023, 8:57 p.m. OK Rust 2021 TESTS 38 31 15052800
234145975 Ddndelion-boy D Nov. 24, 2023, 8:02 p.m. OK Rust 2021 TESTS 38 31 15052800

remove filters

Back to search problems