Codeforces Round 337 (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
610 Codeforces Round 337 (Div. 2) FINISHED False 7200 285964763 Dec. 27, 2015, 11:20 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 915 ) E Alphabet Permutations PROGRAMMING data structures strings 2700

B'You are given a string s of length n, consisting of first k lowercase English letters. We define a c-repeat of some string q as a string, consisting of c copies of the string q. For example, string "acbacbacbacb" is a 4-repeat of the string "acb". Let 's say that string a contains string b as a subsequence, if string b can be obtained from a by erasing some symbols. Let p be a string that represents some permutation of the first k lowercase English letters. We define function d(p) as the smallest integer such that a d(p)-repeat of the string p contains string s as a subsequence. There are m operations of one of two types that can be applied to string s: All operations are performed sequentially, in the order they appear in the input. Your task is to determine the values of function d(p) for all operations of the second type. The first line contains three positive integers n, m and k (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89200 xe2 x80 x89000, xe2 x80 x891 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8920000, xe2 x80 x891 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8910) -- the length of the string s, the number of operations and the size of the alphabet respectively. The second line contains the string s itself. Each of the following lines m contains a description of some operation: For each query of the second type the value of function d(p). After the first operation the string s will be abbbbba. In the second operation the answer is 6-repeat of abc: ABcaBcaBcaBcaBcAbc. After the third operation the string s will be abbcbba. In the fourth operation the answer is 5-repeat of cba: cbAcBacBaCBacBA. Uppercase letters means the occurrences of symbols from the string s.'...

Tutorials

Codeforces Round #337 (Div.2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
15732625 ez_zkj E Feb. 1, 2016, 2:07 p.m. OK FPC TESTS 55 264 202342400 2700
15145971 Profeeder E Jan. 1, 2016, 8:01 a.m. OK FPC TESTS 55 327 323379200 2700
15145950 Profeeder E Jan. 1, 2016, 7:58 a.m. OK FPC TESTS 55 343 323379200 2700
15178477 zhengzh E Jan. 4, 2016, 7:46 a.m. OK FPC TESTS 55 358 219136000 2700
15054746 rqgao2014 E Dec. 27, 2015, 1:07 p.m. OK GNU C++ TESTS 55 46 13004800 2700
15407341 nhho E Jan. 16, 2016, 5:58 p.m. OK GNU C++ TESTS 55 61 5939200 2700
15058422 nwi E Dec. 27, 2015, 3:52 p.m. OK GNU C++ TESTS 55 62 7372800 2700
15076596 iulianrotaru E Dec. 28, 2015, 7:36 p.m. OK GNU C++ TESTS 55 62 8499200 2700
16981606 jcvb E March 28, 2016, 1:51 a.m. OK GNU C++ TESTS 55 77 10649600 2700
20552613 wtw E Sept. 12, 2016, 4:25 p.m. OK GNU C++ TESTS 55 78 5939200 2700
15065216 130705009 E Dec. 28, 2015, 5:03 a.m. OK GNU C++ TESTS 55 78 7372800 2700
16654223 DSSGSRA E March 11, 2016, 4:55 p.m. OK GNU C++ TESTS 55 78 8294400 2700
15053499 NaiveNaive E Dec. 27, 2015, 12:49 p.m. OK GNU C++ TESTS 55 78 8499200 2700
15468537 ddyyxx E Jan. 21, 2016, 12:57 p.m. OK GNU C++ TESTS 55 78 17817600 2700
40985484 ReaLNero1 E July 30, 2018, 7:58 p.m. OK GNU C++11 TESTS 55 46 3379200 2700
15084100 lych123 E Dec. 29, 2015, 11:53 a.m. OK GNU C++11 TESTS 55 46 3379200 2700
52638614 vjudge3 E April 12, 2019, 11:27 a.m. OK GNU C++11 TESTS 55 46 6860800 2700
52638537 vjudge4 E April 12, 2019, 11:25 a.m. OK GNU C++11 TESTS 55 46 34099200 2700
15179514 dinhphuc10cdt2 E Jan. 4, 2016, 9:59 a.m. OK GNU C++11 TESTS 55 62 3379200 2700
16257064 akaring E Feb. 21, 2016, 11:05 a.m. OK GNU C++11 TESTS 55 62 6041600 2700
15151118 Al.Cash E Jan. 1, 2016, 5:57 p.m. OK GNU C++11 TESTS 55 62 6041600 2700
57816525 py_ultron E July 26, 2019, 8:01 p.m. OK GNU C++11 TESTS 55 62 6348800 2700
15151605 Al.Cash E Jan. 1, 2016, 6:34 p.m. OK GNU C++11 TESTS 55 62 6348800 2700
15151194 Al.Cash E Jan. 1, 2016, 6:04 p.m. OK GNU C++11 TESTS 55 77 6041600 2700
43040010 nickluo E Sept. 18, 2018, 3:12 p.m. OK GNU C++14 TESTS 55 62 6860800 2700
25566938 __wtf__ E March 17, 2017, 8:18 a.m. OK GNU C++14 TESTS 55 62 11468800 2700
66272470 vjudge3 E Dec. 4, 2019, 12:47 p.m. OK GNU C++14 TESTS 55 62 13312000 2700
43035848 nickluo E Sept. 18, 2018, 1:34 p.m. OK GNU C++14 TESTS 55 77 7577600 2700
23466323 Ali.Pi E Dec. 31, 2016, 8:58 a.m. OK GNU C++14 TESTS 55 77 8396800 2700
66268297 vjudge3 E Dec. 4, 2019, 11:21 a.m. OK GNU C++14 TESTS 55 93 7270400 2700
43035956 nickluo E Sept. 18, 2018, 1:36 p.m. OK GNU C++14 TESTS 55 93 7577600 2700
34435282 lyx_cjz E Jan. 22, 2018, 6:46 a.m. OK GNU C++14 TESTS 55 93 9932800 2700
57097030 htamlive E July 15, 2019, 12:35 p.m. OK GNU C++14 TESTS 55 109 3891200 2700
53435896 TadijaSebez E April 27, 2019, 7:09 p.m. OK GNU C++14 TESTS 55 140 8396800 2700
62541462 Kuroni E Oct. 14, 2019, 3:43 a.m. OK GNU C++17 TESTS 55 78 6144000 2700
67654067 HyscereXD E Dec. 26, 2019, 1:15 p.m. OK GNU C++17 TESTS 55 93 21094400 2700
54999460 RedTea E June 3, 2019, 3:19 a.m. OK GNU C++17 TESTS 55 140 7680000 2700
59583658 AliShahali1382 E Aug. 27, 2019, 5:04 p.m. OK GNU C++17 TESTS 55 155 324403200 2700
52534577 Fulisike E April 9, 2019, 2:59 p.m. OK GNU C++17 TESTS 55 187 263577600 2700
64195302 hjk1030 E Nov. 4, 2019, 9:26 a.m. OK GNU C++17 TESTS 55 187 330444800 2700
66297166 ArshiaDadras E Dec. 5, 2019, 5:08 a.m. OK GNU C++17 TESTS 55 202 6860800 2700
67616027 Atreus E Dec. 25, 2019, 5:15 p.m. OK GNU C++17 TESTS 55 202 330752000 2700
55566991 vjudge4 E June 14, 2019, 4:04 p.m. OK GNU C++17 TESTS 55 202 402124800 2700
66281333 AS.82 E Dec. 4, 2019, 5:21 p.m. OK GNU C++17 TESTS 55 218 297676800 2700
15339226 searcher774 E Jan. 14, 2016, 2:44 a.m. OK Java 8 TESTS 55 327 3584000 2700
29705424 Baelish E Aug. 23, 2017, 11:19 a.m. OK Java 8 TESTS 55 358 6041600 2700
20346896 hama-du E Sept. 2, 2016, 6:41 p.m. OK Java 8 TESTS 55 358 7065600 2700
24290944 SamuelLH E Jan. 31, 2017, 1:22 p.m. OK Java 8 TESTS 55 358 33484800 2700
15050516 uwi E Dec. 27, 2015, 12:14 p.m. OK Java 8 TESTS 55 670 397516800 2700
15087431 AnatolyTolstobrov E Dec. 29, 2015, 4:19 p.m. OK MS C# TESTS 55 624 156364800 2700
15087475 AnatolyTolstobrov E Dec. 29, 2015, 4:23 p.m. OK MS C# TESTS 55 639 156672000 2700
15085460 Carups E Dec. 29, 2015, 1:41 p.m. OK MS C++ TESTS 55 140 6656000 2700
15058497 AleksanderBalobanov E Dec. 27, 2015, 4:01 p.m. OK MS C++ TESTS 55 311 331673600 2700
15056169 yoones.rezaei E Dec. 27, 2015, 1:45 p.m. OK MS C++ TESTS 55 405 227942400 2700
15060264 yoones.rezaei E Dec. 27, 2015, 6:30 p.m. OK MS C++ TESTS 55 421 227942400 2700
15160417 Darooha E Jan. 2, 2016, 4:17 p.m. OK Ocaml TESTS 55 420 12390400 2700
15155115 Darooha E Jan. 2, 2016, 5:06 a.m. OK Ocaml TESTS 55 436 12083200 2700

remove filters

Back to search problems