Educational Codeforces Round 136 (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
1739 Educational Codeforces Round 136 (Rated for Div. 2) FINISHED False 7200 67361099 Sept. 29, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 544 ) F Keyboard Design PROGRAMMING bitmasks data structures dp string suffix structures strings

B'Monocarp has a dictionary of n words, consisting of 12 first letters of the Latin alphabet. The words are numbered from 1 to n . In every pair of adjacent characters in each word, the characters are different. For every word i , Monocarp also has an integer c_i denoting how often he uses this word. Monocarp wants to design a keyboard that would allow him to type some of the words easily. A keyboard can be denoted as a sequence of 12 first letters of the Latin alphabet, where each letter from a to l appears exactly once. A word can be typed with the keyboard easily if, for every pair of adjacent characters in the word, these characters are adjacent in the keyboard as well. The optimality of the keyboard is the sum of c_i over all words i that can be typed easily with it. Help Monocarp to design a keyboard with the maximum possible optimality. The first line contains one integer n ( 1 <= n <= 1000 ) -- the number of words. Then, n lines follow. The i -th of them contains an integer c_i ( 1 <= c_i <= 10^5 ) and a string s_i ( 2 <= |s_i| <= 2000 ) denoting the i -th word. Each character of s_i is one of 12 first letters of Latin alphabet, in lowercase. For every j in [1, |s_i| - 1] , the j -th character of s_i is different from the (j+1) -th one. Additional constraint on the input: sum limits_{i=1}^{n} |s_i| <= 2000 . Print a sequence of 12 first letters of the Latin alphabet, where each letter from a to l appears exactly once, denoting the optimal keyboard. If there are multiple answers, you may print any of them. '...

Tutorials

Educational Codeforces Round 136 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
174159504 Aravind_435 F Sept. 30, 2022, 5:51 p.m. OK Clang++20 Diagnostics TESTS 82 451 244326400
174196314 gnawyymmij F Oct. 1, 2022, 4 a.m. OK GNU C++14 TESTS 82 108 654131200
174002802 Kaitokid F Sept. 29, 2022, 5:15 p.m. OK GNU C++14 TESTS 82 249 796262400
174059994 Wangxueyi F Sept. 30, 2022, 9:05 a.m. OK GNU C++14 TESTS 82 374 222515200
174053369 themoon F Sept. 30, 2022, 7:48 a.m. OK GNU C++14 TESTS 82 467 66048000
174069211 i__ztyqwq_ak F Sept. 30, 2022, 10:55 a.m. OK GNU C++14 TESTS 82 623 198041600
174025192 multipass F Sept. 29, 2022, 10:31 p.m. OK GNU C++14 TESTS 82 764 41779200
174053291 themoon F Sept. 30, 2022, 7:47 a.m. OK GNU C++14 TESTS 82 779 792678400
174035225 jtf_shine F Sept. 30, 2022, 2:36 a.m. OK GNU C++17 TESTS 82 46 101273600
174012415 Traditional_16_food F Sept. 29, 2022, 6:56 p.m. OK GNU C++17 TESTS 82 77 41881600
174196356 jimywang F Oct. 1, 2022, 4:01 a.m. OK GNU C++17 TESTS 82 124 654131200
174000109 patou F Sept. 29, 2022, 4:54 p.m. OK GNU C++17 TESTS 82 139 125644800
174083519 Soapen F Sept. 30, 2022, 1:33 p.m. OK GNU C++17 TESTS 82 202 198144000
174013655 Traditional_16_food F Sept. 29, 2022, 7:11 p.m. OK GNU C++17 TESTS 82 217 82432000
174014926 MatsuTaku F Sept. 29, 2022, 7:28 p.m. OK GNU C++17 TESTS 82 249 121139200
174014906 MatsuTaku F Sept. 29, 2022, 7:28 p.m. OK GNU C++17 TESTS 82 265 121139200
174169820 zhangshaojia F Sept. 30, 2022, 7:19 p.m. OK GNU C++17 TESTS 82 311 201932800
174000712 RDDCCD F Sept. 29, 2022, 4:59 p.m. OK GNU C++17 TESTS 82 327 131891200
174089395 Larry0101 F Sept. 30, 2022, 2:31 p.m. OK GNU C++17 (64) TESTS 82 61 41779200
174037287 mattagar6 F Sept. 30, 2022, 3:22 a.m. OK GNU C++17 (64) TESTS 82 93 82944000
174017617 Andreasyan F Sept. 29, 2022, 8:06 p.m. OK GNU C++17 (64) TESTS 82 93 104550400
174052496 wygzgyw F Sept. 30, 2022, 7:37 a.m. OK GNU C++17 (64) TESTS 82 93 198041600
174017172 Andreasyan F Sept. 29, 2022, 8 p.m. OK GNU C++17 (64) TESTS 82 108 104550400
174044954 william556 F Sept. 30, 2022, 5:59 a.m. OK GNU C++17 (64) TESTS 82 108 301056000
174079451 foreverlasting F Sept. 30, 2022, 12:50 p.m. OK GNU C++17 (64) TESTS 82 109 82534400
174003818 fallleaves07 F Sept. 29, 2022, 5:25 p.m. OK GNU C++17 (64) TESTS 82 109 120934400
174121417 cjnwq F Sept. 30, 2022, 3:38 p.m. OK GNU C++17 (64) TESTS 82 124 84787200
174113110 cjnwq F Sept. 30, 2022, 3:22 p.m. OK GNU C++17 (64) TESTS 82 124 102604800
174093060 taa1 F Sept. 30, 2022, 2:47 p.m. OK GNU C++20 (64) TESTS 82 46 41779200
174045085 Ye_Che F Sept. 30, 2022, 6:01 a.m. OK GNU C++20 (64) TESTS 82 93 79769600
174005418 huangxiaohua F Sept. 29, 2022, 5:41 p.m. OK GNU C++20 (64) TESTS 82 93 126156800
174036360 Forza_Ferrari F Sept. 30, 2022, 3:02 a.m. OK GNU C++20 (64) TESTS 82 93 197222400
174007750 touristjiangly F Sept. 29, 2022, 6:04 p.m. OK GNU C++20 (64) TESTS 82 93 197427200
174054619 conzloi F Sept. 30, 2022, 8:04 a.m. OK GNU C++20 (64) TESTS 82 93 197734400
174005501 huangxiaohua F Sept. 29, 2022, 5:41 p.m. OK GNU C++20 (64) TESTS 82 108 126156800
174007907 ASLEH F Sept. 29, 2022, 6:06 p.m. OK GNU C++20 (64) TESTS 82 109 129638400
174054000 njwrz F Sept. 30, 2022, 7:56 a.m. OK GNU C++20 (64) TESTS 82 139 395776000
174024923 jeroenodb F Sept. 29, 2022, 10:24 p.m. OK GNU C++20 (64) TESTS 82 140 118784000
174056311 Spheniscine F Sept. 30, 2022, 8:24 a.m. OK Rust 2021 TESTS 82 140 199065600
174055443 Spheniscine F Sept. 30, 2022, 8:13 a.m. OK Rust 2021 TESTS 82 140 199270400
174185493 Spheniscine F Oct. 1, 2022, 12:42 a.m. OK Rust 2021 TESTS 82 156 199065600
174040190 Spheniscine F Sept. 30, 2022, 4:23 a.m. OK Rust 2021 TESTS 82 156 199270400
174036032 Spheniscine F Sept. 30, 2022, 2:54 a.m. OK Rust 2021 TESTS 82 186 238694400

remove filters

Back to search problems