Educational Codeforces Round 91 (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
1380 Educational Codeforces Round 91 (Rated for Div. 2) FINISHED False 9000 137258099 July 12, 2020, 2:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4710 ) D Berserk And Fireball PROGRAMMING brute force greedy math

B'There are n warriors in a row. The power of the i -th warrior is a_i . All powers are pairwise distinct. You have two types of spells which you may cast: For example, let the powers of warriors be [2, 3, 7, 8, 11, 5, 4] , and k = 3 . If you cast Berserk on warriors with powers 8 and 11 , the resulting sequence of powers becomes [2, 3, 7, 11, 5, 4] . Then, for example, if you cast Fireball on consecutive warriors with powers [7, 11, 5] , the resulting sequence of powers becomes [2, 3, 4] . You want to turn the current sequence of warriors powers a_1, a_2, ... , a_n into b_1, b_2, ... , b_m . Calculate the minimum amount of mana you need to spend on it. The first line contains two integers n and m ( 1 <= n, m <= 2 cdot 10^5 ) -- the length of sequence a and the length of sequence b respectively. The second line contains three integers x, k, y ( 1 <= x, y, <= 10^9; 1 <= k <= n ) -- the cost of fireball, the range of fireball and the cost of berserk respectively. The third line contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= n ). It is guaranteed that all integers a_i are pairwise distinct. The fourth line contains m integers b_1, b_2, ... , b_m ( 1 <= b_i <= n ). It is guaranteed that all integers b_i are pairwise distinct. Print the minimum amount of mana for turning the sequnce a_1, a_2, ... , a_n into b_1, b_2, ... , b_m , or -1 if it is impossible. '...

Tutorials

Educational Codeforces Round 91 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
86692417 Gassa D July 12, 2020, 5 p.m. OK D TESTS 35 78 18227200
86689837 singerl D July 12, 2020, 4:42 p.m. OK GNU C11 TESTS 35 62 6144000
86693536 SPyofgame D July 12, 2020, 5:08 p.m. OK GNU C++11 TESTS 35 31 6144000
86692020 wang_sj D July 12, 2020, 4:57 p.m. OK GNU C++11 TESTS 35 46 6348800
86685253 scimoon D July 12, 2020, 4:15 p.m. OK GNU C++11 TESTS 35 46 8704000
86683772 myx12345 D July 12, 2020, 4:08 p.m. OK GNU C++11 TESTS 35 46 11980800
86692245 ketchuppp D July 12, 2020, 4:59 p.m. OK GNU C++11 TESTS 35 61 5734400
86696295 arkob D July 12, 2020, 5:35 p.m. OK GNU C++11 TESTS 35 61 5734400
86713389 heguangfu D July 13, 2020, 2:44 a.m. OK GNU C++11 TESTS 35 61 6348800
86684095 DarkoLoveRuby D July 12, 2020, 4:09 p.m. OK GNU C++11 TESTS 35 62 5324800
86689201 bruno.iljazovic D July 12, 2020, 4:38 p.m. OK GNU C++11 TESTS 35 62 5324800
86715600 YJJ_Konnyaku D July 13, 2020, 3:56 a.m. OK GNU C++11 TESTS 35 62 5529600
86713396 hunxuewangzi D July 13, 2020, 2:45 a.m. OK GNU C++14 TESTS 35 77 5324800
86701832 Raveesh D July 12, 2020, 7:14 p.m. OK GNU C++14 TESTS 35 77 6144000
86700313 Punisher D July 12, 2020, 6:42 p.m. OK GNU C++14 TESTS 35 77 6553600
86712930 Compiled D July 13, 2020, 2:28 a.m. OK GNU C++14 TESTS 35 77 7782400
86686691 Kazumin D July 12, 2020, 4:23 p.m. OK GNU C++14 TESTS 35 77 13312000
86689010 TheLethalCode D July 12, 2020, 4:37 p.m. OK GNU C++14 TESTS 35 78 4915200
86673290 WiwiHo D July 12, 2020, 3:31 p.m. OK GNU C++14 TESTS 35 78 4915200
86712393 gouh9qn D July 13, 2020, 2:08 a.m. OK GNU C++14 TESTS 35 78 5324800
86688839 _no0B D July 12, 2020, 4:35 p.m. OK GNU C++14 TESTS 35 78 5324800
86693937 Zoli9 D July 12, 2020, 5:11 p.m. OK GNU C++14 TESTS 35 78 5836800
86669219 LayCurse D July 12, 2020, 3:20 p.m. OK GNU C++17 TESTS 35 46 8294400
86705864 begv D July 12, 2020, 9:03 p.m. OK GNU C++17 TESTS 35 77 4505600
86689875 qfhy D July 12, 2020, 4:42 p.m. OK GNU C++17 TESTS 35 77 5222400
86679073 RobeZH D July 12, 2020, 3:49 p.m. OK GNU C++17 TESTS 35 77 5324800
86670333 natsugiri D July 12, 2020, 3:23 p.m. OK GNU C++17 TESTS 35 77 5529600
86690141 IIT_kr_lo_fir_life_set_h D July 12, 2020, 4:44 p.m. OK GNU C++17 TESTS 35 77 7168000
86713475 DD_BOND D July 13, 2020, 2:47 a.m. OK GNU C++17 TESTS 35 77 11776000
86720467 udayan14 D July 13, 2020, 5:41 a.m. OK GNU C++17 TESTS 35 78 4915200
86685864 slycelote D July 12, 2020, 4:19 p.m. OK GNU C++17 TESTS 35 78 4915200
86721611 Convergence D July 13, 2020, 5:59 a.m. OK GNU C++17 TESTS 35 78 5324800
86700644 conquizztador D July 12, 2020, 6:49 p.m. OK GNU C++17 (64) TESTS 35 46 5529600
86681181 Marckess D July 12, 2020, 3:57 p.m. OK GNU C++17 (64) TESTS 35 46 5939200
86697177 zuhn D July 12, 2020, 5:48 p.m. OK GNU C++17 (64) TESTS 35 46 7884800
86675357 emthrm D July 12, 2020, 3:37 p.m. OK GNU C++17 (64) TESTS 35 46 7884800
86708733 saketh D July 12, 2020, 10:59 p.m. OK GNU C++17 (64) TESTS 35 61 5120000
86687102 Vasyl_Protsiv D July 12, 2020, 4:25 p.m. OK GNU C++17 (64) TESTS 35 61 5529600
86715152 neal D July 13, 2020, 3:44 a.m. OK GNU C++17 (64) TESTS 35 61 5529600
86680053 victoragnez D July 12, 2020, 3:52 p.m. OK GNU C++17 (64) TESTS 35 61 6348800
86703411 MZuenni D July 12, 2020, 7:52 p.m. OK GNU C++17 (64) TESTS 35 61 6758400
86700884 tute7627 D July 12, 2020, 6:53 p.m. OK GNU C++17 (64) TESTS 35 61 6758400
86712782 Russell_Emerine D July 13, 2020, 2:23 a.m. OK Haskell TESTS 35 701 57856000
86707325 Anonymous D July 12, 2020, 9:56 p.m. OK Java 11 TESTS 35 187 23961600
86680963 uwi D July 12, 2020, 3:56 p.m. OK Java 11 TESTS 35 202 24166400
86708565 mphillotry D July 12, 2020, 10:49 p.m. OK Java 11 TESTS 35 217 24678400
86715175 Oopsimbad D July 13, 2020, 3:45 a.m. OK Java 11 TESTS 35 218 24473600
86700826 idk321 D July 12, 2020, 6:52 p.m. OK Java 11 TESTS 35 233 24780800
86714545 skittles1412 D July 13, 2020, 3:23 a.m. OK Java 11 TESTS 35 233 26214400
86704058 Richard727 D July 12, 2020, 8:09 p.m. OK Java 11 TESTS 35 234 33382400
86694133 anhtaihsgs D July 12, 2020, 5:12 p.m. OK Java 11 TESTS 35 249 24678400
86699696 bobib D July 12, 2020, 6:30 p.m. OK Java 11 TESTS 35 280 28364800
86683252 dqian3 D July 12, 2020, 4:05 p.m. OK Java 11 TESTS 35 514 24473600
86687805 saurabhs1206 D July 12, 2020, 4:29 p.m. OK Java 8 TESTS 35 140 20480000
86690472 aman28rwt D July 12, 2020, 4:46 p.m. OK Java 8 TESTS 35 140 20889600
86702335 robinz62 D July 12, 2020, 7:26 p.m. OK Java 8 TESTS 35 155 20684800
86720406 AnandOza D July 13, 2020, 5:39 a.m. OK Java 8 TESTS 35 155 25702400
86713296 sudhanshu_lucky D July 13, 2020, 2:42 a.m. OK Java 8 TESTS 35 155 25907200
86693300 godxpunk D July 12, 2020, 5:06 p.m. OK Java 8 TESTS 35 155 26316800
86712207 flyman3046 D July 13, 2020, 2 a.m. OK Java 8 TESTS 35 171 25600000
86694596 Peter_Fahmi D July 12, 2020, 5:16 p.m. OK Java 8 TESTS 35 171 25600000
86693545 gawsfbet D July 12, 2020, 5:08 p.m. OK Java 8 TESTS 35 171 25702400
86677382 TheSawan D July 12, 2020, 3:43 p.m. OK Java 8 TESTS 35 171 25804800
86690609 golions D July 12, 2020, 4:47 p.m. OK Kotlin TESTS 35 249 36864000
86707202 Mosyagin D July 12, 2020, 9:52 p.m. OK Mono C# TESTS 35 140 32563200
86710640 0Mordecai0 D July 13, 2020, 12:55 a.m. OK MS C++ 2017 TESTS 35 249 13312000
86689901 grey D July 12, 2020, 4:42 p.m. OK MS C++ 2017 TESTS 35 280 8601600
86688291 1dayac D July 12, 2020, 4:32 p.m. OK MS C++ 2017 TESTS 35 327 16076800
86678498 pajenegod D July 12, 2020, 3:47 p.m. OK PyPy 2 TESTS 35 171 35840000
86707450 realnimish D July 12, 2020, 10 p.m. OK PyPy 2 TESTS 35 171 41984000
86690391 raj1307 D July 12, 2020, 4:46 p.m. OK PyPy 2 TESTS 35 264 43520000
86696141 a0976531005 D July 12, 2020, 5:33 p.m. OK PyPy 3 TESTS 35 202 38195200
86689938 kclee2172 D July 12, 2020, 4:42 p.m. OK PyPy 3 TESTS 35 217 39424000
86696059 gintoki_s D July 12, 2020, 5:32 p.m. OK PyPy 3 TESTS 35 218 40448000
86699821 _apurv_ D July 12, 2020, 6:33 p.m. OK PyPy 3 TESTS 35 234 45568000
86674588 neterukun D July 12, 2020, 3:35 p.m. OK PyPy 3 TESTS 35 249 40857600
86706401 siyy D July 12, 2020, 9:22 p.m. OK PyPy 3 TESTS 35 280 38092800
86691002 TorchRik D July 12, 2020, 4:50 p.m. OK PyPy 3 TESTS 35 311 35737600
86693116 crackcraft D July 12, 2020, 5:05 p.m. OK PyPy 3 TESTS 35 311 35942400
86689542 throwawayatcoder D July 12, 2020, 4:40 p.m. OK PyPy 3 TESTS 35 311 40345600
86687225 yuusanlondon D July 12, 2020, 4:25 p.m. OK PyPy 3 TESTS 35 327 35840000
86693743 evg-zhabotinsky D July 12, 2020, 5:09 p.m. OK Python 3 TESTS 35 295 20889600
86696260 sh1194 D July 12, 2020, 5:35 p.m. OK Python 3 TESTS 35 311 20889600
86679925 kingmoshe D July 12, 2020, 3:52 p.m. OK Python 3 TESTS 35 343 21299200
86709649 ssharkk D July 12, 2020, 11:52 p.m. OK Python 3 TESTS 35 390 20889600
86692186 alon276 D July 12, 2020, 4:58 p.m. OK Python 3 TESTS 35 405 21811200
86691292 robostac D July 12, 2020, 4:52 p.m. OK Rust TESTS 35 62 10035200

remove filters

Back to search problems