Educational Codeforces Round 57 (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
1096 Educational Codeforces Round 57 (Rated for Div. 2) FINISHED False 7200 185815499 Dec. 28, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 8150 ) D Easy Problem PROGRAMMING dp 1800

B"Vasya is preparing a contest, and now he has written a statement for an easy problem. The statement is a string of length n consisting of lowercase Latin latters. Vasya thinks that the statement can be considered hard if it contains a subsequence hard; otherwise the statement is easy. For example, hard, hzazrzd, haaaaard can be considered hard statements, while har, hart and drah are easy statements. Vasya doesn't want the statement to be hard. He may remove some characters from the statement in order to make it easy. But, of course, some parts of the statement can be crucial to understanding. Initially the ambiguity of the statement is 0 , and removing i -th character increases the ambiguity by a_i (the index of each character is considered as it was in the original statement, so, for example, if you delete character r from hard, and then character d, the index of d is still 4 even though you delete it from the string had). Vasya wants to calculate the minimum ambiguity of the statement, if he removes some characters (possibly zero) so that the statement is easy. Help him to do it! Recall that subsequence is a sequence that can be derived from another sequence by deleting some elements without changing the order of the remaining elements. The first line contains one integer n ( 1 <= n <= 10^5 ) -- the length of the statement. The second line contains one string s of length n , consisting of lowercase Latin letters -- the statement written by Vasya. The third line contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 998244353 ). Print minimum possible ambiguity of the statement after Vasya deletes some (possibly zero) characters so the resulting statement is easy. In the first example, first two characters are removed so the result is ardh. In the second example, 5 -th character is removed so the result is hhzawde. In the third example there's no need to remove anything. "...

Tutorials

Разбор Educational Codeforces Round 57

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
47723345 teru D Dec. 30, 2018, 12:45 p.m. OK Clang++17 Diagnostics TESTS 27 156 4096000 1800
47674909 ia7ck D Dec. 29, 2018, 8:31 a.m. OK D TESTS 27 62 11571200 1800
47674854 ia7ck D Dec. 29, 2018, 8:29 a.m. OK D TESTS 27 62 11571200 1800
51349832 rr_ D March 15, 2019, 8:55 p.m. OK D TESTS 27 62 11776000 1800
51348748 rr_ D March 15, 2019, 8:05 p.m. OK D TESTS 27 62 11776000 1800
47674777 ia7ck D Dec. 29, 2018, 8:25 a.m. OK D TESTS 27 62 22425600 1800
48501581 nanae1914 D Jan. 17, 2019, 3:22 p.m. OK D TESTS 27 77 22425600 1800
47694538 ruban D Dec. 29, 2018, 4:18 p.m. OK Delphi TESTS 27 78 126976000 1800
58492342 naranja011223 D Aug. 9, 2019, 10:27 a.m. OK FPC TESTS 27 62 4915200 1800
47720347 hoangmaicongdat2001 D Dec. 30, 2018, 10:50 a.m. OK FPC TESTS 27 62 110284800 1800
47672973 sansen D Dec. 29, 2018, 7:18 a.m. OK GNU C11 TESTS 27 31 102400 1800
47644936 sansen D Dec. 28, 2018, 3:45 p.m. OK GNU C11 TESTS 27 31 4505600 1800
48461978 rainboy D Jan. 16, 2019, 3:09 p.m. OK GNU C11 TESTS 27 46 102400 1800
47887861 Bramble D Jan. 4, 2019, 2:33 a.m. OK GNU C11 TESTS 27 46 4915200 1800
48046030 wenbo1188 D Jan. 7, 2019, 3:05 a.m. OK GNU C11 TESTS 27 61 102400 1800
48422111 MYNAMEISSHARIFUL D Jan. 15, 2019, 1:16 p.m. OK GNU C11 TESTS 27 62 3686400 1800
47726068 Faimerth D Dec. 30, 2018, 2:18 p.m. OK GNU C11 TESTS 27 62 73113600 1800
48109620 msuwakow D Jan. 9, 2019, 8:25 a.m. OK GNU C++11 TESTS 27 30 512000 1800
47665762 Dilute D Dec. 28, 2018, 11:52 p.m. OK GNU C++11 TESTS 27 31 102400 1800
49936184 Photinia.S D Feb. 15, 2019, 7:23 a.m. OK GNU C++11 TESTS 27 31 102400 1800
47711301 heguangfu D Dec. 30, 2018, 3:49 a.m. OK GNU C++11 TESTS 27 31 307200 1800
58171304 spsicio D Aug. 2, 2019, 11:25 a.m. OK GNU C++11 TESTS 27 31 307200 1800
48105711 luogu_bot5 D Jan. 9, 2019, 4:42 a.m. OK GNU C++11 TESTS 27 31 512000 1800
48654412 ReaLNero1 D Jan. 21, 2019, 1:32 a.m. OK GNU C++11 TESTS 27 31 512000 1800
47648170 msuwakow D Dec. 28, 2018, 4:01 p.m. OK GNU C++11 TESTS 27 31 614400 1800
48406539 luogu_bot3 D Jan. 15, 2019, 4:22 a.m. OK GNU C++11 TESTS 27 31 921600 1800
67764004 huanggs D Dec. 28, 2019, 1:56 a.m. OK GNU C++11 TESTS 27 31 1945600 1800
49875291 tokitsukaze D Feb. 13, 2019, 3:35 p.m. OK GNU C++14 TESTS 27 30 1024000 1800
58060812 bytedance_ D July 31, 2019, 7:21 a.m. OK GNU C++14 TESTS 27 31 1024000 1800
47656582 wleung_bvg D Dec. 28, 2018, 5 p.m. OK GNU C++14 TESTS 27 31 1024000 1800
49070526 toysmars D Jan. 27, 2019, 8:23 p.m. OK GNU C++14 TESTS 27 46 102400 1800
49070547 vjudge2 D Jan. 27, 2019, 8:25 p.m. OK GNU C++14 TESTS 27 46 102400 1800
58367186 yyhslfw D Aug. 6, 2019, 4:48 a.m. OK GNU C++14 TESTS 27 46 102400 1800
48314394 Netanyar D Jan. 13, 2019, 5:32 a.m. OK GNU C++14 TESTS 27 46 102400 1800
57660759 S33k4ndD35tr0y D July 24, 2019, 3:02 p.m. OK GNU C++14 TESTS 27 46 307200 1800
65267470 x20 D Nov. 17, 2019, 5:50 p.m. OK GNU C++14 TESTS 27 46 307200 1800
57278512 sa9660623 D July 18, 2019, 11:51 a.m. OK GNU C++14 TESTS 27 46 307200 1800
47644843 mai D Dec. 28, 2018, 3:44 p.m. OK GNU C++17 TESTS 27 31 1024000 1800
60701992 vjudge2 D Sept. 17, 2019, 1:35 a.m. OK GNU C++17 TESTS 27 46 102400 1800
61371541 vjudge1 D Sept. 27, 2019, 3:10 p.m. OK GNU C++17 TESTS 27 46 102400 1800
67386119 Mohd. D Dec. 21, 2019, 5:53 p.m. OK GNU C++17 TESTS 27 46 102400 1800
60349908 Guaguapi D Sept. 10, 2019, 1:56 p.m. OK GNU C++17 TESTS 27 46 204800 1800
47796061 iMac D Dec. 31, 2018, 5:04 p.m. OK GNU C++17 TESTS 27 46 307200 1800
47684827 AayushAC1998 D Dec. 29, 2018, 2:10 p.m. OK GNU C++17 TESTS 27 46 307200 1800
47681113 babin74 D Dec. 29, 2018, 12:10 p.m. OK GNU C++17 TESTS 27 46 307200 1800
51219893 harishmara98 D March 12, 2019, 12:03 p.m. OK GNU C++17 TESTS 27 46 307200 1800
66985466 yasharp83 D Dec. 15, 2019, 5:56 p.m. OK GNU C++17 TESTS 27 46 307200 1800
68633405 WangJialei D Jan. 12, 2020, 4:30 a.m. OK Go TESTS 27 109 4505600 1800
62255857 synapse D Oct. 10, 2019, 10:47 a.m. OK Go TESTS 27 124 0 1800
62249564 synapse D Oct. 10, 2019, 8:50 a.m. OK Go TESTS 27 124 0 1800
47960832 chanbakjsd D Jan. 5, 2019, 9:12 a.m. OK Go TESTS 27 124 0 1800
47647956 caidodo0_0 D Dec. 28, 2018, 4 p.m. OK Go TESTS 27 124 5222400 1800
47667717 2008061626 D Dec. 29, 2018, 2:44 a.m. OK Go TESTS 27 140 0 1800
47658469 fengsuiyan D Dec. 28, 2018, 5:42 p.m. OK Haskell TESTS 27 529 83148800 1800
63758242 pikapika00 D Oct. 30, 2019, 1:32 a.m. OK Java 11 TESTS 27 202 0 1800
68352808 ZeyadKhattab D Jan. 7, 2020, 10:41 a.m. OK Java 11 TESTS 27 233 14745600 1800
69628053 cribabby D Jan. 27, 2020, 4:23 p.m. OK Java 11 TESTS 27 373 25088000 1800
47644230 Yugioh D Dec. 28, 2018, 3:41 p.m. OK Java 8 TESTS 27 109 0 1800
49156387 revanthreddy85 D Jan. 29, 2019, 1:54 p.m. OK Java 8 TESTS 27 124 0 1800
48506559 pj21 D Jan. 17, 2019, 5:57 p.m. OK Java 8 TESTS 27 124 0 1800
47959461 bazinga84 D Jan. 5, 2019, 8:31 a.m. OK Java 8 TESTS 27 124 0 1800
47886242 rogernadal D Jan. 3, 2019, 11:26 p.m. OK Java 8 TESTS 27 124 0 1800
47872645 Faizan D Jan. 3, 2019, 1:41 p.m. OK Java 8 TESTS 27 124 0 1800
47679387 --- D Dec. 29, 2018, 11:15 a.m. OK Java 8 TESTS 27 124 0 1800
47670042 coderbond007 D Dec. 29, 2018, 5:05 a.m. OK Java 8 TESTS 27 124 0 1800
47673141 GreatWhite D Dec. 29, 2018, 7:24 a.m. OK Java 8 TESTS 27 124 0 1800
59112361 mbfeci D Aug. 19, 2019, 9:51 p.m. OK Java 8 TESTS 27 124 0 1800
47648519 zloi.timur D Dec. 28, 2018, 4:03 p.m. OK Kotlin TESTS 27 187 3788800 1800
47648854 mircea85 D Dec. 28, 2018, 4:05 p.m. OK Mono C# TESTS 27 77 10240000 1800
47646454 omikad D Dec. 28, 2018, 3:52 p.m. OK Mono C# TESTS 27 78 14131200 1800
48039117 IleksaNott D Jan. 6, 2019, 5:46 p.m. OK Mono C# TESTS 27 93 14131200 1800
48169649 eki D Jan. 10, 2019, 5:45 a.m. OK Mono C# TESTS 27 108 20992000 1800
47645382 kuuso D Dec. 28, 2018, 3:47 p.m. OK Mono C# TESTS 27 109 18636800 1800
48106750 vjudge5 D Jan. 9, 2019, 5:59 a.m. OK MS C++ TESTS 27 31 102400 1800
47826829 god_alonely D Jan. 2, 2019, 12:50 a.m. OK MS C++ TESTS 27 31 921600 1800
49340566 vjudge5 D Feb. 1, 2019, 10:22 p.m. OK MS C++ TESTS 27 31 921600 1800
49192183 vjudge5 D Jan. 30, 2019, 8:43 a.m. OK MS C++ TESTS 27 31 4096000 1800
69843147 vjudge1 D Jan. 30, 2020, 1:41 p.m. OK MS C++ TESTS 27 31 4915200 1800
48106755 vjudge1 D Jan. 9, 2019, 6 a.m. OK MS C++ TESTS 27 46 102400 1800
60701996 vjudge2 D Sept. 17, 2019, 1:35 a.m. OK MS C++ TESTS 27 46 102400 1800
48536932 vjudge5 D Jan. 18, 2019, 2:44 p.m. OK MS C++ TESTS 27 46 102400 1800
66107278 vjudge4 D Dec. 1, 2019, 8:57 a.m. OK MS C++ TESTS 27 46 204800 1800
48866074 vjudge2 D Jan. 24, 2019, 3:13 a.m. OK MS C++ TESTS 27 46 307200 1800
66099668 vjudge4 D Dec. 1, 2019, 8:17 a.m. OK MS C++ 2017 TESTS 27 46 921600 1800
69877387 vjudge5 D Jan. 31, 2020, 4:48 a.m. OK MS C++ 2017 TESTS 27 61 4096000 1800
54977247 antofik D June 2, 2019, 11:25 a.m. OK MS C++ 2017 TESTS 27 61 4096000 1800
60271482 920848348 D Sept. 8, 2019, 3:43 p.m. OK MS C++ 2017 TESTS 27 61 4915200 1800
69647676 vjudge4 D Jan. 28, 2020, 2:50 a.m. OK MS C++ 2017 TESTS 27 62 204800 1800
57358532 ___sss D July 20, 2019, 7:04 a.m. OK MS C++ 2017 TESTS 27 62 512000 1800
66183556 vjudge4 D Dec. 2, 2019, 1:40 p.m. OK MS C++ 2017 TESTS 27 62 4505600 1800
60285248 wzp171 D Sept. 9, 2019, 1:36 a.m. OK MS C++ 2017 TESTS 27 62 8908800 1800
55715555 Fly-Style D June 18, 2019, 12:31 p.m. OK MS C++ 2017 TESTS 27 124 102400 1800
52906020 diolio D April 17, 2019, 12:40 p.m. OK MS C++ 2017 TESTS 27 124 307200 1800
48403094 Senahk D Jan. 15, 2019, 12:13 a.m. OK Ocaml TESTS 27 46 1740800 1800
47816104 sk0 D Jan. 1, 2019, 2:29 p.m. OK Ocaml TESTS 27 62 7987200 1800
47655048 water D Dec. 28, 2018, 4:38 p.m. OK PyPy 2 TESTS 27 155 8192000 1800
47648583 sy_chen D Dec. 28, 2018, 4:04 p.m. OK PyPy 2 TESTS 27 155 8294400 1800
47657910 wangkan2001 D Dec. 28, 2018, 5:27 p.m. OK PyPy 2 TESTS 27 156 7782400 1800
47657276 c1729 D Dec. 28, 2018, 5:14 p.m. OK PyPy 2 TESTS 27 187 9318400 1800
47647552 astrom.lars D Dec. 28, 2018, 3:58 p.m. OK PyPy 2 TESTS 27 202 15257600 1800
48051826 Onesh0t D Jan. 7, 2019, 9:38 a.m. OK PyPy 2 TESTS 27 202 16281600 1800
56441167 kabeer27 D July 2, 2019, 4:28 p.m. OK PyPy 2 TESTS 27 218 8908800 1800
47663743 cherry_su D Dec. 28, 2018, 9:14 p.m. OK PyPy 2 TESTS 27 218 13824000 1800
54423778 gatsko D May 20, 2019, 5:02 p.m. OK PyPy 2 TESTS 27 280 14950400 1800
47658458 YESMAths D Dec. 28, 2018, 5:42 p.m. OK PyPy 2 TESTS 27 280 22016000 1800
52221384 homoeconomicus D April 2, 2019, 6:48 a.m. OK PyPy 3 TESTS 27 218 13926400 1800
47659404 kgmkr00001 D Dec. 28, 2018, 6:10 p.m. OK PyPy 3 TESTS 27 218 13926400 1800
47647484 Naoki_M D Dec. 28, 2018, 3:58 p.m. OK PyPy 3 TESTS 27 218 14643200 1800
47683951 mathdude42 D Dec. 29, 2018, 1:39 p.m. OK PyPy 3 TESTS 27 233 14438400 1800
47807043 Paixao D Jan. 1, 2019, 8:12 a.m. OK PyPy 3 TESTS 27 233 14643200 1800
48939213 rithwik27 D Jan. 25, 2019, 3:41 p.m. OK PyPy 3 TESTS 27 249 12185600 1800
54939875 MotaSanyal D June 1, 2019, 4:13 p.m. OK PyPy 3 TESTS 27 249 17100800 1800
47714341 akane_rika D Dec. 30, 2018, 6:32 a.m. OK PyPy 3 TESTS 27 249 19251200 1800
54779364 whatshisbucket D May 28, 2019, 8:11 p.m. OK PyPy 3 TESTS 27 264 17203200 1800
61027135 ashok123 D Sept. 21, 2019, 4:21 p.m. OK PyPy 3 TESTS 27 265 11673600 1800
47644480 nwi D Dec. 28, 2018, 3:43 p.m. OK Python 2 TESTS 27 233 5734400 1800
47674997 kaif_7 D Dec. 29, 2018, 8:34 a.m. OK Python 2 TESTS 27 249 5836800 1800
47718881 Wizmann D Dec. 30, 2018, 9:49 a.m. OK Python 2 TESTS 27 265 6553600 1800
48302116 ssk497 D Jan. 12, 2019, 5:30 p.m. OK Python 2 TESTS 27 280 5734400 1800
50700097 ikovrigin D March 2, 2019, 8:35 p.m. OK Python 2 TESTS 27 296 5836800 1800
55708850 anshuman16423 D June 18, 2019, 9:11 a.m. OK Python 2 TESTS 27 326 5836800 1800
47814660 markovDPro D Jan. 1, 2019, 1:38 p.m. OK Python 2 TESTS 27 452 14131200 1800
55097516 pa.n.ik D June 4, 2019, 6:03 p.m. OK Python 2 TESTS 27 624 120832000 1800
47667414 KanhuKeNanu D Dec. 29, 2018, 2:21 a.m. OK Python 3 TESTS 27 186 8089600 1800
47676713 Dmitriy.Belichenko D Dec. 29, 2018, 9:35 a.m. OK Python 3 TESTS 27 187 6963200 1800
47664538 hitalia D Dec. 28, 2018, 10:08 p.m. OK Python 3 TESTS 27 202 6963200 1800
49915496 hoochiemane D Feb. 14, 2019, 4:17 p.m. OK Python 3 TESTS 27 202 8192000 1800
50569589 arunjyothi D Feb. 27, 2019, 2:43 p.m. OK Python 3 TESTS 27 202 8294400 1800
47723962 shrenikagada D Dec. 30, 2018, 1:08 p.m. OK Python 3 TESTS 27 202 8294400 1800
47659198 sy_chen D Dec. 28, 2018, 6:03 p.m. OK Python 3 TESTS 27 217 6963200 1800
47666230 mizukurage D Dec. 29, 2018, 12:38 a.m. OK Python 3 TESTS 27 217 7782400 1800
47653964 old_boo D Dec. 28, 2018, 4:32 p.m. OK Python 3 TESTS 27 217 8089600 1800
47871724 saku7 D Jan. 3, 2019, 1:15 p.m. OK Python 3 TESTS 27 217 8294400 1800
47701771 Orfest D Dec. 29, 2018, 5:12 p.m. OK Rust TESTS 27 46 4198400 1800
64603673 jrodrigues D Nov. 9, 2019, 7:27 p.m. OK Rust TESTS 27 46 6860800 1800
47886977 marcio.diaz D Jan. 4, 2019, 12:57 a.m. OK Rust TESTS 27 61 9728000 1800
47887086 marcio.diaz D Jan. 4, 2019, 1:09 a.m. OK Rust TESTS 27 62 9728000 1800
47649037 yakamoto D Dec. 28, 2018, 4:06 p.m. OK Scala TESTS 27 482 1945600 1800
47654686 yakamoto D Dec. 28, 2018, 4:34 p.m. OK Scala TESTS 27 482 2150400 1800
49186045 jkxjkx1031 D Jan. 30, 2019, 6:05 a.m. OK Scala TESTS 27 592 0 1800

remove filters

Back to search problems