Codeforces Round 541 (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
1131 Codeforces Round 541 (Div. 2) FINISHED False 7200 180905999 Feb. 23, 2019, 10:20 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1152 ) E String Multiplication PROGRAMMING dp greedy strings 2200

B'Roman and Denis are on the trip to the programming competition. Since the trip was long, they soon got bored, and hence decided to came up with something. Roman invented a pizza 's recipe, while Denis invented a string multiplication. According to Denis, the result of multiplication (product) of strings s of length m and t is a string t + s_1 + t + s_2 + ldots + t + s_m + t , where s_i denotes the i -th symbol of the string s , and "+" denotes string concatenation. For example, the product of strings "abc" and "de" is a string "deadebdecde", while the product of the strings "ab" and "z" is a string "zazbz". Note, that unlike the numbers multiplication, the product of strings s and t is not necessarily equal to product of t and s . Roman was jealous of Denis, since he invented such a cool operation, and hence decided to invent something string-related too. Since Roman is beauty-lover, he decided to define the beauty of the string as the length of the longest substring, consisting of only one letter. For example, the beauty of the string "xayyaaabca" is equal to 3 , since there is a substring "aaa", while the beauty of the string "qwerqwer" is equal to 1 , since all neighboring symbols in it are different. In order to entertain Roman, Denis wrote down n strings p_1, p_2, p_3, ldots, p_n on the paper and asked him to calculate the beauty of the string ( ldots (((p_1 cdot p_2) cdot p_3) cdot ldots ) cdot p_n , where s cdot t denotes a multiplication of strings s and t . Roman hasn 't fully realized how Denis 's multiplication works, so he asked you for a help. Denis knows, that Roman is very impressionable, he guarantees, that the beauty of the resulting string is at most 10^9 . The first line contains a single integer n ( 2 <= q n <= q 100 ,000 ) -- the number of strings, wroted by Denis. Next n lines contain non-empty strings'...

Tutorials

Codeforces Round #541 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
50399030 Hiasat E Feb. 23, 2019, 5:18 p.m. OK Clang++17 Diagnostics TESTS 52 233 102400 2200
50416170 libra8z E Feb. 24, 2019, 6:40 a.m. OK GNU C11 TESTS 52 31 102400 2200
50416124 libra8z E Feb. 24, 2019, 6:39 a.m. OK GNU C11 TESTS 52 46 102400 2200
50564642 X_o_r E Feb. 27, 2019, 12:37 p.m. OK GNU C++11 TESTS 52 31 0 2200
50410857 dqa2020 E Feb. 24, 2019, 2:26 a.m. OK GNU C++11 TESTS 52 31 0 2200
50667778 HeHere E March 2, 2019, 5:19 a.m. OK GNU C++11 TESTS 52 31 0 2200
54220447 vjudge1 E May 16, 2019, 2:55 a.m. OK GNU C++11 TESTS 52 31 102400 2200
54572221 Bengal_Tiger E May 24, 2019, 8:04 p.m. OK GNU C++11 TESTS 52 31 102400 2200
54188608 Ark_ E May 15, 2019, 3:05 p.m. OK GNU C++11 TESTS 52 31 102400 2200
52006865 keke_haha E March 30, 2019, 8:10 a.m. OK GNU C++11 TESTS 52 31 102400 2200
51100289 d3dx10 E March 9, 2019, 6:37 p.m. OK GNU C++11 TESTS 52 31 102400 2200
58888555 dknguyen176 E Aug. 16, 2019, 3:53 a.m. OK GNU C++11 TESTS 52 31 102400 2200
54188889 vjudge3 E May 15, 2019, 3:06 p.m. OK GNU C++11 TESTS 52 31 102400 2200
50389894 Zory E Feb. 23, 2019, 1:35 p.m. OK GNU C++14 TESTS 52 30 102400 2200
51137370 p1rattttt E March 10, 2019, 4:55 p.m. OK GNU C++14 TESTS 52 30 307200 2200
50559662 Tiramister E Feb. 27, 2019, 10:13 a.m. OK GNU C++14 TESTS 52 30 2662400 2200
50400088 summitwei E Feb. 23, 2019, 5:49 p.m. OK GNU C++14 TESTS 52 30 2764800 2200
50588289 wvuvw E Feb. 28, 2019, 5:40 a.m. OK GNU C++14 TESTS 52 31 102400 2200
50588233 wvuvw E Feb. 28, 2019, 5:38 a.m. OK GNU C++14 TESTS 52 31 102400 2200
50560490 Jhamra E Feb. 27, 2019, 10:43 a.m. OK GNU C++14 TESTS 52 31 102400 2200
50609348 Szki E Feb. 28, 2019, 4:09 p.m. OK GNU C++14 TESTS 52 31 102400 2200
50495906 neo11235 E Feb. 25, 2019, 3:09 p.m. OK GNU C++14 TESTS 52 31 102400 2200
50874789 Newusers E March 6, 2019, 5:27 a.m. OK GNU C++14 TESTS 52 31 102400 2200
52942826 VEGAnn E April 18, 2019, 10:06 a.m. OK GNU C++17 TESTS 52 30 2764800 2200
50697022 kumalimak E March 2, 2019, 6:41 p.m. OK GNU C++17 TESTS 52 30 5427200 2200
50666008 lys1280023 E March 2, 2019, 4:11 a.m. OK GNU C++17 TESTS 52 31 102400 2200
50805674 shenyunhan E March 5, 2019, 5:14 a.m. OK GNU C++17 TESTS 52 31 102400 2200
50665979 KellyLu E March 2, 2019, 4:10 a.m. OK GNU C++17 TESTS 52 31 102400 2200
50515561 lhclqslove E Feb. 26, 2019, 6:08 a.m. OK GNU C++17 TESTS 52 31 102400 2200
50489880 swust-5120175253 E Feb. 25, 2019, 12:58 p.m. OK GNU C++17 TESTS 52 31 102400 2200
50489020 swust-5120175253 E Feb. 25, 2019, 12:42 p.m. OK GNU C++17 TESTS 52 31 102400 2200
50384705 decoqwq E Feb. 23, 2019, 12:14 p.m. OK GNU C++17 TESTS 52 31 102400 2200
50383816 Andreasyan E Feb. 23, 2019, 12:10 p.m. OK GNU C++17 TESTS 52 31 102400 2200
50399976 dai E Feb. 23, 2019, 5:46 p.m. OK Go TESTS 52 62 0 2200
50516511 2008061626 E Feb. 26, 2019, 6:47 a.m. OK Go TESTS 52 78 0 2200
50877155 danagi E March 6, 2019, 6:59 a.m. OK Haskell TESTS 52 545 105164800 2200
50881643 danagi E March 6, 2019, 9:09 a.m. OK Haskell TESTS 52 607 78950400 2200
50392540 ISSAM_LAKOUAM E Feb. 23, 2019, 2:29 p.m. OK Java 8 TESTS 52 109 0 2200
50511026 tmwilliamlin168 E Feb. 26, 2019, 12:37 a.m. OK Java 8 TESTS 52 124 0 2200
50418293 poketred12 E Feb. 24, 2019, 7:47 a.m. OK Java 8 TESTS 52 124 0 2200
50407938 PrakharJain E Feb. 23, 2019, 10:35 p.m. OK Java 8 TESTS 52 139 0 2200
59539376 beginner1010 E Aug. 26, 2019, 6:13 p.m. OK Java 8 TESTS 52 139 0 2200
58174181 kusomushi E Aug. 2, 2019, 12:27 p.m. OK Java 8 TESTS 52 140 0 2200
50995610 Oopsimbad E March 8, 2019, 3:24 a.m. OK Java 8 TESTS 52 140 16588800 2200
50406513 PrakharJain E Feb. 23, 2019, 9:10 p.m. OK Java 8 TESTS 52 155 0 2200
51365429 dreamsh19 E March 16, 2019, 9:21 a.m. OK Java 8 TESTS 52 155 0 2200
50549529 surajchip2 E Feb. 27, 2019, 2:28 a.m. OK Java 8 TESTS 52 155 5222400 2200
54820575 camypaper E May 30, 2019, 2:10 a.m. OK Mono C# TESTS 52 171 11776000 2200
58414957 wawahaha E Aug. 7, 2019, 4:15 a.m. OK MS C++ TESTS 52 46 3072000 2200
50580862 NuM E Feb. 27, 2019, 9:19 p.m. OK MS C++ TESTS 52 62 7065600 2200
50486400 2017111799yjl E Feb. 25, 2019, 11:44 a.m. OK MS C++ 2017 TESTS 52 62 307200 2200
50388089 pajenegod E Feb. 23, 2019, 1:07 p.m. OK PyPy 2 TESTS 52 218 8601600 2200
50422216 r57shell E Feb. 24, 2019, 9:40 a.m. OK PyPy 3 TESTS 52 171 2867200 2200
50385193 tjake E Feb. 23, 2019, 12:16 p.m. OK PyPy 3 TESTS 52 218 7782400 2200
50384594 nobe0716 E Feb. 23, 2019, 12:13 p.m. OK PyPy 3 TESTS 52 795 7987200 2200
51802632 yumtam E March 24, 2019, 7 p.m. OK PyPy 3 TESTS 52 795 8192000 2200
60753954 CubeCakes E Sept. 18, 2019, 7:53 a.m. OK PyPy 3 TESTS 52 810 7372800 2200
50406175 meooow E Feb. 23, 2019, 8:55 p.m. OK PyPy 3 TESTS 52 1169 6656000 2200
60347914 Sevlll E Sept. 10, 2019, 1:14 p.m. OK PyPy 3 TESTS 52 1403 34611200 2200
51112810 zhangmnthuime E March 10, 2019, 5:26 a.m. OK Python 2 TESTS 52 1513 2764800 2200
50391307 soony E Feb. 23, 2019, 2:01 p.m. OK Python 3 TESTS 52 405 6860800 2200
50405659 Jurii E Feb. 23, 2019, 8:35 p.m. OK Python 3 TESTS 52 1232 512000 2200
50422302 r57shell E Feb. 24, 2019, 9:42 a.m. OK Python 3 TESTS 52 1356 921600 2200
50395593 kenkoooo E Feb. 23, 2019, 3:45 p.m. OK Rust TESTS 52 78 14848000 2200

remove filters

Back to search problems