Educational Codeforces Round 83 (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
1312 Educational Codeforces Round 83 (Rated for Div. 2) FINISHED False 7200 148058699 March 9, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 988 ) G Autocompletion PROGRAMMING data structures dfs and similar dp

B'You are given a set of strings S . Each string consists of lowercase Latin letters. For each string in this set, you want to calculate the minimum number of seconds required to type this string. To type a string, you have to start with an empty string and transform it into the string you want to type using the following actions: What is the minimum number of seconds that you have to spend to type each string from S ? Note that the strings from S are given in an unusual way. The first line contains one integer n ( 1 <= n <= 10^6 ). Then n lines follow, the i -th line contains one integer p_i ( 0 <= p_i < i ) and one lowercase Latin character c_i . These lines form some set of strings such that S is its subset as follows: there are n + 1 strings, numbered from 0 to n ; the 0 -th string is an empty string, and the i -th string ( i ge 1 ) is the result of appending the character c_i to the string p_i . It is guaranteed that all these strings are distinct. The next line contains one integer k ( 1 <= k <= n ) -- the number of strings in S . The last line contains k integers a_1 , a_2 , ..., a_k ( 1 <= a_i <= n , all a_i are pairwise distinct) denoting the indices of the strings generated by above-mentioned process that form the set S -- formally, if we denote the i -th generated string as s_i , then S = {s_{a_1}, s_{a_2}, ... , s_{a_k}} . Print k integers, the i -th of them should be equal to the minimum number of seconds required to type the string s_{a_i} . In the first example, S consists of the following strings: ieh, iqgp, i, iqge, ier. '...

Tutorials

74640

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
72817232 rainboy G March 9, 2020, 3:13 p.m. OK GNU C11 TESTS 50 3665 181248000
73450674 wasa855 G March 17, 2020, 3:16 a.m. OK GNU C++11 TESTS 50 374 169267200
73023166 hdu_daicon G March 12, 2020, 1:04 p.m. OK GNU C++11 TESTS 50 436 168243200
72875827 Frame233 G March 10, 2020, 7:33 a.m. OK GNU C++11 TESTS 50 499 169267200
72997038 Fruiteaaa G March 12, 2020, 5:23 a.m. OK GNU C++11 TESTS 50 514 180224000
72867160 z7z_Eta G March 10, 2020, 4:17 a.m. OK GNU C++11 TESTS 50 514 185036800
72836367 yuzhechuan G March 9, 2020, 4:26 p.m. OK GNU C++11 TESTS 50 561 220467200
72863763 yuzhechuan G March 10, 2020, 2:26 a.m. OK GNU C++11 TESTS 50 561 220467200
72997061 PrisonerOvO G March 12, 2020, 5:24 a.m. OK GNU C++11 TESTS 50 577 180224000
72927170 superbigjuruo G March 11, 2020, 2:05 a.m. OK GNU C++11 TESTS 50 607 168243200
72943709 minakami_yuki G March 11, 2020, 9:39 a.m. OK GNU C++11 TESTS 50 716 196300800
72928361 stonemasons G March 11, 2020, 2:56 a.m. OK GNU C++14 TESTS 50 390 85401600
72835908 ikun142857 G March 9, 2020, 4:24 p.m. OK GNU C++14 TESTS 50 452 224051200
72932629 Devil G March 11, 2020, 5:28 a.m. OK GNU C++14 TESTS 50 561 161280000
72850632 rainboy G March 9, 2020, 7:15 p.m. OK GNU C++14 TESTS 50 748 181248000
72904090 farmerboy G March 10, 2020, 3:34 p.m. OK GNU C++14 TESTS 50 764 196608000
73291482 RobeZH G March 14, 2020, 10:29 p.m. OK GNU C++14 TESTS 50 779 124211200
73022907 wzh520wzh G March 12, 2020, 12:59 p.m. OK GNU C++14 TESTS 50 779 168243200
72974910 Lius G March 11, 2020, 5:43 p.m. OK GNU C++14 TESTS 50 779 213504000
72935397 777777777Plus G March 11, 2020, 6:36 a.m. OK GNU C++14 TESTS 50 794 156262400
72954675 cheissmart G March 11, 2020, 12:48 p.m. OK GNU C++14 TESTS 50 795 122060800
72987613 limbo.null G March 11, 2020, 10:36 p.m. OK GNU C++17 TESTS 50 265 180531200
72832858 neal G March 9, 2020, 4:10 p.m. OK GNU C++17 TESTS 50 421 85401600
72907247 9baka_Cirno G March 10, 2020, 4:25 p.m. OK GNU C++17 TESTS 50 748 168243200
72845347 cerberus97 G March 9, 2020, 5:59 p.m. OK GNU C++17 TESTS 50 764 122675200
72884753 lqs2015 G March 10, 2020, 10:24 a.m. OK GNU C++17 TESTS 50 764 171212800
73386781 nthoang G March 16, 2020, 7:06 a.m. OK GNU C++17 TESTS 50 779 64409600
72853770 SendThemToHell G March 9, 2020, 8:10 p.m. OK GNU C++17 TESTS 50 795 201625600
72856190 Bohoty G March 9, 2020, 9:08 p.m. OK GNU C++17 TESTS 50 810 187289600
72826579 emengdeath G March 9, 2020, 3:44 p.m. OK GNU C++17 TESTS 50 811 160256000
72832125 neal G March 9, 2020, 4:07 p.m. OK GNU C++17 TESTS 50 826 85299200
72875450 wzazzy G March 10, 2020, 7:26 a.m. OK Go TESTS 50 4414 180838400
72966490 TheSawan G March 11, 2020, 3:36 p.m. OK Java 11 TESTS 50 1606 282828800
72833118 uwi G March 9, 2020, 4:11 p.m. OK Java 11 TESTS 50 3010 450048000
72944965 polyakoff G March 11, 2020, 10:02 a.m. OK Java 8 TESTS 50 1996 262758400
72924680 ijxjdjd G March 10, 2020, 11:38 p.m. OK Java 8 TESTS 50 2542 451891200
72956453 happy15 G March 11, 2020, 1:14 p.m. OK Java 8 TESTS 50 3540 513433600
72955995 happy15 G March 11, 2020, 1:08 p.m. OK Java 8 TESTS 50 6629 536883200
72817866 Kenb G March 9, 2020, 3:15 p.m. OK Kotlin TESTS 50 2106 288256000
73171964 throwawayatcoder G March 13, 2020, 8:26 p.m. OK PyPy 3 TESTS 50 4024 442572800
73174889 throwawayatcoder G March 13, 2020, 9:32 p.m. OK PyPy 3 TESTS 50 4149 444518400

remove filters

Back to search problems