Educational Codeforces Round 59 (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
1107 Educational Codeforces Round 59 (Rated for Div. 2) FINISHED False 7200 183306299 Jan. 26, 2019, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 10015 ) C Brutality PROGRAMMING greedy sortings two pointers 1300

B"You are playing a new famous fighting game: Kortal Mombat XII. You have to perform a brutality on your opponent's character. You are playing the game on the new generation console so your gamepad have 26 buttons. Each button has a single lowercase Latin letter from 'a' to 'z' written on it. All the letters on buttons are pairwise distinct. You are given a sequence of hits, the i -th hit deals a_i units of damage to the opponent's character. To perform the i -th hit you have to press the button s_i on your gamepad. Hits are numbered from 1 to n . You know that if you press some button more than k times in a row then it'll break. You cherish your gamepad and don't want to break any of its buttons. To perform a brutality you have to land some of the hits of the given sequence. You are allowed to skip any of them, however changing the initial order of the sequence is prohibited. The total damage dealt is the sum of a_i over all i for the hits which weren't skipped. Note that if you skip the hit then the counter of consecutive presses the button won't reset. Your task is to skip some hits to deal the maximum possible total damage to the opponent's character and not break your gamepad buttons. The first line of the input contains two integers n and k ( 1 <= k <= n <= 2 cdot 10^5 ) -- the number of hits and the maximum number of times you can push the same button in a row. The second line of the input contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 10^9 ), where a_i is the damage of the i -th hit. The third line of the input contains the string s consisting of exactly n lowercase Latin letters -- the sequence of hits (each character is the letter on the button you need to press to perform the corresponding hit). Print one integer dmg -- the maximum possible damage to the opponent's character you can deal without breaking your gamep"...

Tutorials

Educational Codeforces Round 59 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
57832973 vjudge1 C July 27, 2019, 6:39 a.m. OK Clang++17 Diagnostics TESTS 39 265 3686400 1300
49026629 andre548 C Jan. 26, 2019, 7:20 p.m. OK Clang++17 Diagnostics TESTS 39 265 16076800 1300
57835548 vjudge5 C July 27, 2019, 7:25 a.m. OK Clang++17 Diagnostics TESTS 39 280 16076800 1300
57834859 vjudge5 C July 27, 2019, 7:12 a.m. OK Clang++17 Diagnostics TESTS 39 374 1536000 1300
57831235 vjudge2 C July 27, 2019, 6:05 a.m. OK Clang++17 Diagnostics TESTS 39 389 17408000 1300
57838058 vjudge1 C July 27, 2019, 8:17 a.m. OK Clang++17 Diagnostics TESTS 39 389 21504000 1300
57832606 vjudge5 C July 27, 2019, 6:32 a.m. OK Clang++17 Diagnostics TESTS 39 389 21504000 1300
57831058 vjudge3 C July 27, 2019, 6:01 a.m. OK Clang++17 Diagnostics TESTS 39 389 21504000 1300
57836998 vjudge4 C July 27, 2019, 7:55 a.m. OK Clang++17 Diagnostics TESTS 39 405 21504000 1300
49010888 ruban C Jan. 26, 2019, 4:34 p.m. OK Delphi TESTS 39 171 162099200 1300
49008348 Ahriman C Jan. 26, 2019, 4:21 p.m. OK FPC TESTS 39 93 2150400 1300
49008518 PhuongPeu C Jan. 26, 2019, 4:21 p.m. OK FPC TESTS 39 93 2457600 1300
49056804 TShT C Jan. 27, 2019, 1:39 p.m. OK FPC TESTS 39 93 6144000 1300
49053999 Bear.-. C Jan. 27, 2019, 12:27 p.m. OK FPC TESTS 39 108 4608000 1300
49008231 Kakalinn C Jan. 26, 2019, 4:20 p.m. OK GNU C11 TESTS 39 62 1638400 1300
49049598 biswajit_saha C Jan. 27, 2019, 10:24 a.m. OK GNU C11 TESTS 39 78 1024000 1300
59580053 kaiboy C Aug. 27, 2019, 3:39 p.m. OK GNU C11 TESTS 39 78 1843200 1300
49059206 2018030401093 C Jan. 27, 2019, 2:41 p.m. OK GNU C11 TESTS 39 78 1843200 1300
49059245 vjudge5 C Jan. 27, 2019, 2:42 p.m. OK GNU C11 TESTS 39 78 1843200 1300
51225236 NoSoul C March 12, 2019, 1:52 p.m. OK GNU C11 TESTS 39 78 1843200 1300
49013854 zysbzddsj C Jan. 26, 2019, 4:51 p.m. OK GNU C11 TESTS 39 78 8396800 1300
49006064 rainboy C Jan. 26, 2019, 4:11 p.m. OK GNU C11 TESTS 39 93 1024000 1300
64537838 MHHasan C Nov. 8, 2019, 5:34 p.m. OK GNU C11 TESTS 39 93 5017600 1300
49011248 Horcrux1729 C Jan. 26, 2019, 4:36 p.m. OK GNU C11 TESTS 39 109 3379200 1300
49380143 SGColin C Feb. 3, 2019, 12:09 a.m. OK GNU C++11 TESTS 39 31 3174400 1300
49015511 Gloid C Jan. 26, 2019, 5:01 p.m. OK GNU C++11 TESTS 39 46 1024000 1300
50641222 Rayment C March 1, 2019, 2:01 p.m. OK GNU C++11 TESTS 39 46 1843200 1300
49318339 luogu_bot5 C Feb. 1, 2019, 11:05 a.m. OK GNU C++11 TESTS 39 46 1843200 1300
49193140 liuyiluxun C Jan. 30, 2019, 9:07 a.m. OK GNU C++11 TESTS 39 46 1843200 1300
49013709 Fungigv C Jan. 26, 2019, 4:50 p.m. OK GNU C++11 TESTS 39 46 1843200 1300
62613130 tanao030801 C Oct. 15, 2019, 10:31 a.m. OK GNU C++11 TESTS 39 46 1843200 1300
53846572 tanao_ C May 7, 2019, 11:20 a.m. OK GNU C++11 TESTS 39 46 1843200 1300
51483952 zhouzhuan C March 19, 2019, 12:47 p.m. OK GNU C++11 TESTS 39 46 1843200 1300
49867606 litble C Feb. 13, 2019, 12:36 p.m. OK GNU C++11 TESTS 39 46 1843200 1300
49029103 wleung_bvg C Jan. 26, 2019, 8:45 p.m. OK GNU C++14 TESTS 39 62 5222400 1300
49034287 hzmciu C Jan. 27, 2019, 1:53 a.m. OK GNU C++14 TESTS 39 77 1024000 1300
49025701 PaPaxe C Jan. 26, 2019, 6:56 p.m. OK GNU C++14 TESTS 39 77 1228800 1300
49042756 ljy123 C Jan. 27, 2019, 7:15 a.m. OK GNU C++14 TESTS 39 77 1228800 1300
49012329 slinky C Jan. 26, 2019, 4:42 p.m. OK GNU C++14 TESTS 39 77 1638400 1300
61534384 knight_hunter C Sept. 30, 2019, 5:31 a.m. OK GNU C++14 TESTS 39 77 1638400 1300
49933090 yangshuang C Feb. 15, 2019, 5:54 a.m. OK GNU C++14 TESTS 39 77 1740800 1300
49008742 Mona_Ahmed C Jan. 26, 2019, 4:22 p.m. OK GNU C++14 TESTS 39 77 2355200 1300
50281891 koadma C Feb. 21, 2019, 1:04 p.m. OK GNU C++14 TESTS 39 77 2457600 1300
49027809 phoenix01 C Jan. 26, 2019, 8 p.m. OK GNU C++14 TESTS 39 77 2560000 1300
49203998 .tx C Jan. 30, 2019, 1:21 p.m. OK GNU C++17 TESTS 39 46 2355200 1300
58176673 MRJ35 C Aug. 2, 2019, 1:21 p.m. OK GNU C++17 TESTS 39 62 1024000 1300
49088202 Mynesis C Jan. 28, 2019, 8 a.m. OK GNU C++17 TESTS 39 62 1228800 1300
61775390 j2v C Oct. 3, 2019, 11:34 a.m. OK GNU C++17 TESTS 39 62 1228800 1300
49834035 mohamedeltair C Feb. 12, 2019, 3:14 p.m. OK GNU C++17 TESTS 39 62 2662400 1300
55314943 vjudge3 C June 8, 2019, 8:43 p.m. OK GNU C++17 TESTS 39 77 1638400 1300
49035411 2018329621146 C Jan. 27, 2019, 2:50 a.m. OK GNU C++17 TESTS 39 77 1740800 1300
49076013 supremeyu C Jan. 28, 2019, 3:06 a.m. OK GNU C++17 TESTS 39 77 5222400 1300
56150060 vjudge3 C June 27, 2019, 7:50 a.m. OK GNU C++17 TESTS 39 78 1024000 1300
56150543 llt123456 C June 27, 2019, 8 a.m. OK GNU C++17 TESTS 39 78 1024000 1300
63756196 vjudge5 C Oct. 29, 2019, 11:40 p.m. OK Go TESTS 39 93 4608000 1300
49006178 life_is_not_bed_of_roses C Jan. 26, 2019, 4:11 p.m. OK Go TESTS 39 295 5324800 1300
49513931 hqhs C Feb. 5, 2019, 11:24 p.m. OK Go TESTS 39 296 5324800 1300
52881346 jedikni C April 17, 2019, 12:32 a.m. OK Haskell TESTS 39 327 22118400 1300
63764578 emslmar C Oct. 30, 2019, 5:40 a.m. OK Java 11 TESTS 39 514 27750400 1300
49224882 tsumit023 C Jan. 30, 2019, 9:47 p.m. OK Java 8 TESTS 39 140 0 1300
49025630 mufaddalnaya C Jan. 26, 2019, 6:54 p.m. OK Java 8 TESTS 39 140 0 1300
49080474 dhaval_lila C Jan. 28, 2019, 5:57 a.m. OK Java 8 TESTS 39 155 0 1300
49049401 Pratik_Rajani C Jan. 27, 2019, 10:19 a.m. OK Java 8 TESTS 39 155 0 1300
49040101 Anonymous C Jan. 27, 2019, 6:06 a.m. OK Java 8 TESTS 39 155 0 1300
51476005 bazinga84 C March 19, 2019, 9:26 a.m. OK Java 8 TESTS 39 171 0 1300
49012558 Faizan C Jan. 26, 2019, 4:43 p.m. OK Java 8 TESTS 39 171 0 1300
50070453 niteshgowda C Feb. 17, 2019, 5:24 p.m. OK Java 8 TESTS 39 171 2969600 1300
49036644 aman28rwt C Jan. 27, 2019, 3:49 a.m. OK Java 8 TESTS 39 186 0 1300
49021962 TheRaven C Jan. 26, 2019, 5:45 p.m. OK Java 8 TESTS 39 186 0 1300
49010566 orazbek C Jan. 26, 2019, 4:32 p.m. OK JavaScript TESTS 39 186 36249600 1300
54027570 Farwent C May 12, 2019, 1:43 p.m. OK Kotlin TESTS 39 436 17203200 1300
49011854 Quaternion C Jan. 26, 2019, 4:39 p.m. OK Kotlin TESTS 39 467 18432000 1300
49984555 glider.g C Feb. 16, 2019, 9:55 a.m. OK Kotlin TESTS 39 483 18329600 1300
59381938 david_varela C Aug. 24, 2019, 3:52 a.m. OK Kotlin TESTS 39 514 18432000 1300
60496572 XinLoiNguoi C Sept. 13, 2019, 4:38 p.m. OK Kotlin TESTS 39 514 19968000 1300
49024414 spookywooky C Jan. 26, 2019, 6:23 p.m. OK Kotlin TESTS 39 577 4403200 1300
55016945 og.kostya C June 3, 2019, 12:48 p.m. OK Mono C# TESTS 39 78 4096000 1300
49531637 DoesNotExist C Feb. 6, 2019, 2:04 p.m. OK Mono C# TESTS 39 140 22220800 1300
63617765 m1_k3 C Oct. 27, 2019, 8:29 p.m. OK Mono C# TESTS 39 155 1536000 1300
50038009 IleksaNott C Feb. 16, 2019, 10:20 p.m. OK Mono C# TESTS 39 155 31846400 1300
49007799 eki C Jan. 26, 2019, 4:18 p.m. OK Mono C# TESTS 39 171 30412800 1300
49137681 Gray_Rhino C Jan. 29, 2019, 8:34 a.m. OK Mono C# TESTS 39 171 30924800 1300
49014592 survey C Jan. 26, 2019, 4:56 p.m. OK Mono C# TESTS 39 171 31436800 1300
49324935 selpo C Feb. 1, 2019, 1:43 p.m. OK Mono C# TESTS 39 171 33075200 1300
49105355 ykurmangaliyev C Jan. 28, 2019, 12:55 p.m. OK Mono C# TESTS 39 264 29798400 1300
49738700 lionvs13 C Feb. 10, 2019, 6:18 p.m. OK Mono C# TESTS 39 312 34918400 1300
49936638 vjudge1 C Feb. 15, 2019, 7:34 a.m. OK MS C++ TESTS 39 62 2662400 1300
56368454 vjudge5 C July 1, 2019, 1:39 a.m. OK MS C++ TESTS 39 62 6451200 1300
56147532 vjudge1 C June 27, 2019, 7 a.m. OK MS C++ TESTS 39 77 1024000 1300
49026539 andre548 C Jan. 26, 2019, 7:17 p.m. OK MS C++ TESTS 39 77 1331200 1300
49014046 just. C Jan. 26, 2019, 4:53 p.m. OK MS C++ TESTS 39 77 2457600 1300
49052472 math957963 C Jan. 27, 2019, 11:44 a.m. OK MS C++ TESTS 39 77 5120000 1300
49026600 andre548 C Jan. 26, 2019, 7:19 p.m. OK MS C++ TESTS 39 78 1331200 1300
54229034 vjudge4 C May 16, 2019, 7:53 a.m. OK MS C++ TESTS 39 78 1843200 1300
56249575 vjudge5 C June 29, 2019, 1:38 a.m. OK MS C++ TESTS 39 78 2457600 1300
49015294 yuzhibo C Jan. 26, 2019, 5 p.m. OK MS C++ TESTS 39 78 3379200 1300
51418402 petko_mitkov C March 17, 2019, 3:14 p.m. OK MS C++ 2017 TESTS 39 93 1024000 1300
54448282 hwangganzi C May 21, 2019, 12:23 p.m. OK MS C++ 2017 TESTS 39 93 1843200 1300
49026507 andre548 C Jan. 26, 2019, 7:16 p.m. OK MS C++ 2017 TESTS 39 109 1433600 1300
49026585 andre548 C Jan. 26, 2019, 7:19 p.m. OK MS C++ 2017 TESTS 39 109 1433600 1300
57459626 116c C July 21, 2019, 1:02 p.m. OK MS C++ 2017 TESTS 39 109 1843200 1300
61771155 j2v C Oct. 3, 2019, 10:14 a.m. OK MS C++ 2017 TESTS 39 124 2867200 1300
49021143 L2279296959 C Jan. 26, 2019, 5:33 p.m. OK MS C++ 2017 TESTS 39 124 8396800 1300
51973937 CtrlAlt C March 29, 2019, 1:36 p.m. OK MS C++ 2017 TESTS 39 140 4915200 1300
62450675 coder_pikachu C Oct. 13, 2019, 3:53 a.m. OK MS C++ 2017 TESTS 39 202 1433600 1300
62452275 coder_pikachu C Oct. 13, 2019, 4:50 a.m. OK MS C++ 2017 TESTS 39 202 2252800 1300
49036739 sk0 C Jan. 27, 2019, 3:54 a.m. OK Ocaml TESTS 39 186 13619200 1300
49036533 sk0 C Jan. 27, 2019, 3:44 a.m. OK Ocaml TESTS 39 187 14131200 1300
49024700 sk0 C Jan. 26, 2019, 6:29 p.m. OK Ocaml TESTS 39 202 14131200 1300
50594310 Stanislav666 C Feb. 28, 2019, 9:16 a.m. OK PascalABC.NET TESTS 39 405 204800 1300
49028624 mayakin C Jan. 26, 2019, 8:28 p.m. OK PHP TESTS 39 514 23142400 1300
49106540 katalama C Jan. 28, 2019, 1:20 p.m. OK PHP TESTS 39 889 28979200 1300
49013765 raven_47 C Jan. 26, 2019, 4:51 p.m. OK PyPy 2 TESTS 39 186 17100800 1300
49006241 gatsko C Jan. 26, 2019, 4:11 p.m. OK PyPy 2 TESTS 39 187 13209600 1300
49008209 alessandrosolbiati C Jan. 26, 2019, 4:20 p.m. OK PyPy 2 TESTS 39 187 15155200 1300
49007119 alankrit_singh_1 C Jan. 26, 2019, 4:15 p.m. OK PyPy 2 TESTS 39 202 14233600 1300
49005944 _kawaii_neko_ C Jan. 26, 2019, 4:10 p.m. OK PyPy 2 TESTS 39 202 16691200 1300
49008204 codeseeker C Jan. 26, 2019, 4:20 p.m. OK PyPy 2 TESTS 39 202 17305600 1300
49189160 thenewguy39 C Jan. 30, 2019, 7:29 a.m. OK PyPy 2 TESTS 39 218 18636800 1300
49131434 dtl8 C Jan. 29, 2019, 4:34 a.m. OK PyPy 2 TESTS 39 234 17100800 1300
49032967 kabeer27 C Jan. 27, 2019, 12:40 a.m. OK PyPy 2 TESTS 39 234 19251200 1300
49007393 wangkan2001 C Jan. 26, 2019, 4:16 p.m. OK PyPy 2 TESTS 39 295 13414400 1300
49987830 c1729 C Feb. 16, 2019, 11:23 a.m. OK PyPy 3 TESTS 39 218 22732800 1300
49987718 c1729 C Feb. 16, 2019, 11:20 a.m. OK PyPy 3 TESTS 39 233 22732800 1300
49523924 c1729 C Feb. 6, 2019, 10:04 a.m. OK PyPy 3 TESTS 39 249 38604800 1300
49986951 c1729 C Feb. 16, 2019, 10:58 a.m. OK PyPy 3 TESTS 39 280 22630400 1300
49987068 c1729 C Feb. 16, 2019, 11:02 a.m. OK PyPy 3 TESTS 39 280 31129600 1300
49013630 artworks C Jan. 26, 2019, 4:50 p.m. OK PyPy 3 TESTS 39 311 19865600 1300
49062817 nobe0716 C Jan. 27, 2019, 4:14 p.m. OK PyPy 3 TESTS 39 312 20172800 1300
49007157 quandum C Jan. 26, 2019, 4:15 p.m. OK PyPy 3 TESTS 39 312 21196800 1300
49521781 mr.adisbek C Feb. 6, 2019, 8:30 a.m. OK PyPy 3 TESTS 39 326 20172800 1300
49038367 Narut C Jan. 27, 2019, 5:15 a.m. OK PyPy 3 TESTS 39 327 18636800 1300
49013609 ritesh1340 C Jan. 26, 2019, 4:50 p.m. OK Python 2 TESTS 39 405 12492800 1300
49912460 nealzane C Feb. 14, 2019, 2:52 p.m. OK Python 2 TESTS 39 467 11161600 1300
49018765 jhoelD C Jan. 26, 2019, 5:20 p.m. OK Python 2 TESTS 39 468 11059200 1300
49018896 shubhankarsharma00 C Jan. 26, 2019, 5:21 p.m. OK Python 2 TESTS 39 483 11161600 1300
49061857 lprashant94 C Jan. 27, 2019, 3:49 p.m. OK Python 2 TESTS 39 498 11980800 1300
49015271 Binga C Jan. 26, 2019, 5 p.m. OK Python 2 TESTS 39 498 11980800 1300
49015102 x313x C Jan. 26, 2019, 4:59 p.m. OK Python 2 TESTS 39 514 22630400 1300
49111185 ilkerkosaroglu C Jan. 28, 2019, 3 p.m. OK Python 2 TESTS 39 561 11059200 1300
49236566 SoSooding C Jan. 31, 2019, 8:20 a.m. OK Python 2 TESTS 39 561 19660800 1300
49105008 god1048 C Jan. 28, 2019, 12:47 p.m. OK Python 2 TESTS 39 577 17305600 1300
49014632 shvetsovamd C Jan. 26, 2019, 4:56 p.m. OK Python 3 TESTS 39 265 16486400 1300
54786254 akshat8171 C May 29, 2019, 4:09 a.m. OK Python 3 TESTS 39 296 16486400 1300
57300919 FlyingBag65 C July 18, 2019, 11:25 p.m. OK Python 3 TESTS 39 296 16896000 1300
49011206 dilettante C Jan. 26, 2019, 4:36 p.m. OK Python 3 TESTS 39 296 18944000 1300
49101758 Leendertz C Jan. 28, 2019, 11:37 a.m. OK Python 3 TESTS 39 311 16486400 1300
49079254 SleepZzz C Jan. 28, 2019, 5:27 a.m. OK Python 3 TESTS 39 311 17408000 1300
49010618 ddatsko010101 C Jan. 26, 2019, 4:33 p.m. OK Python 3 TESTS 39 312 16486400 1300
49022413 Bayshubar C Jan. 26, 2019, 5:50 p.m. OK Python 3 TESTS 39 327 16076800 1300
49190440 Seamooo C Jan. 30, 2019, 8:01 a.m. OK Python 3 TESTS 39 327 16486400 1300
49014909 dave13 C Jan. 26, 2019, 4:57 p.m. OK Python 3 TESTS 39 327 16486400 1300
49010162 geckods C Jan. 26, 2019, 4:30 p.m. OK Ruby TESTS 39 404 37273600 1300
49016372 majali C Jan. 26, 2019, 5:07 p.m. OK Ruby TESTS 39 499 39321600 1300
49393012 kobae964 C Feb. 3, 2019, 11:03 a.m. OK Rust TESTS 39 171 5836800 1300
49036906 wpxy C Jan. 27, 2019, 4:02 a.m. OK Scala TESTS 39 655 17510400 1300
49108607 mikkk C Jan. 28, 2019, 2:03 p.m. OK Scala TESTS 39 810 18432000 1300

remove filters

Back to search problems