Codeforces Round 543 (Div. 1, based on Technocup 2019 Final Round)

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
1120 Codeforces Round 543 (Div. 1, based on Technocup 2019 Final Round) FINISHED False 7200 180195899 March 3, 2019, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2116 ) C Compress String PROGRAMMING dp strings 2200

B"Suppose you are given a string s of length n consisting of lowercase English letters. You need to compress it using the smallest possible number of coins. To compress the string, you have to represent s as a concatenation of several non-empty strings: s = t_{1} t_{2} ldots t_{k} . The i -th of these strings should be encoded with one of the two ways: A string x is a substring of a string y if x can be obtained from y by deletion of several (possibly, zero or all) characters from the beginning and several (possibly, zero or all) characters from the end. So your task is to calculate the minimum possible number of coins you need to spend in order to compress the given string s . The first line contains three positive integers, separated by spaces: n , a and b ( 1 <= q n, a, b <= q 5000 ) -- the length of the string, the cost to compress a one-character string and the cost to compress a string that appeared before. The second line contains a single string s , consisting of n lowercase English letters. Output a single integer -- the smallest possible number of coins you need to spend to compress s . In the first sample case, you can set t_{1} = 'a', t_{2} = 'b', t_{3} = 'a' and pay 3 + 3 + 1 = 7 coins, since t_{3} is a substring of t_{1}t_{2} . In the second sample, you just need to compress every character by itself. In the third sample, you set t_{1} = t_{2} = 'a', t_{3} = 'aa' and pay 10 + 1 + 1 = 12 coins, since t_{2} is a substring of t_{1} and t_{3} is a substring of t_{1} t_{2} . "...

Tutorials

Разбор задач финала Технокубка 2019 и Codeforces Round #543

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
50782457 libra8z C March 4, 2019, noon OK GNU C11 TESTS 45 77 100454400 2200
50751403 rainboy C March 3, 2019, 4:34 p.m. OK GNU C11 TESTS 45 187 100249600 2200
53488340 hjmmm C April 29, 2019, 6:30 a.m. OK GNU C++11 TESTS 45 31 921600 2200
54260888 vjudge4 C May 17, 2019, 1:29 a.m. OK GNU C++11 TESTS 45 31 1126400 2200
50778642 Hazyknight C March 4, 2019, 10:07 a.m. OK GNU C++11 TESTS 45 31 1228800 2200
57981957 sys. C July 30, 2019, 9:44 a.m. OK GNU C++11 TESTS 45 31 1228800 2200
51408772 yybyyb C March 17, 2019, 11:07 a.m. OK GNU C++11 TESTS 45 31 1228800 2200
51278022 vjudge3 C March 14, 2019, 12:03 a.m. OK GNU C++11 TESTS 45 31 3686400 2200
51278137 ForwardFuture C March 14, 2019, 12:14 a.m. OK GNU C++11 TESTS 45 31 3788800 2200
51429215 Zenkai C March 17, 2019, 9:50 p.m. OK GNU C++11 TESTS 45 31 4608000 2200
57575717 qiyue C July 23, 2019, 6:56 a.m. OK GNU C++11 TESTS 45 31 4812800 2200
51267709 fluttersunny C March 13, 2019, 4:24 p.m. OK GNU C++11 TESTS 45 31 6144000 2200
51560095 calabash_boy C March 20, 2019, 7:36 a.m. OK GNU C++14 TESTS 45 30 3788800 2200
50768612 bestFy C March 4, 2019, 1:43 a.m. OK GNU C++14 TESTS 45 31 1228800 2200
51559990 calabash_boy C March 20, 2019, 7:34 a.m. OK GNU C++14 TESTS 45 31 5222400 2200
51925701 Nostalgically C March 28, 2019, 7:31 a.m. OK GNU C++14 TESTS 45 46 1126400 2200
50754945 philologist C March 3, 2019, 5:10 p.m. OK GNU C++14 TESTS 45 46 1228800 2200
50775575 mayaohua2003 C March 4, 2019, 8:16 a.m. OK GNU C++14 TESTS 45 46 1228800 2200
50931918 FallDream C March 7, 2019, 2:20 p.m. OK GNU C++14 TESTS 45 46 1228800 2200
58345500 HouZAJ C Aug. 5, 2019, 2:48 p.m. OK GNU C++14 TESTS 45 46 1331200 2200
50781847 jerome_wei C March 4, 2019, 11:45 a.m. OK GNU C++14 TESTS 45 46 1331200 2200
50820252 vjudge3 C March 5, 2019, 1:15 p.m. OK GNU C++14 TESTS 45 46 1433600 2200
51281529 MOPKOBKA228 C March 14, 2019, 4:24 a.m. OK GNU C++17 TESTS 45 30 102809600 2200
62183405 yzh1505 C Oct. 9, 2019, 7:18 a.m. OK GNU C++17 TESTS 45 31 1024000 2200
50782097 idxcalccalc C March 4, 2019, 11:51 a.m. OK GNU C++17 TESTS 45 31 1126400 2200
62342290 201732110113 C Oct. 11, 2019, 5:47 a.m. OK GNU C++17 TESTS 45 31 27750400 2200
51281696 MOPKOBKA228 C March 14, 2019, 4:32 a.m. OK GNU C++17 TESTS 45 31 102400000 2200
50929544 SebaMarin C March 7, 2019, 1:19 p.m. OK GNU C++17 TESTS 45 46 1126400 2200
51415503 bibibibi C March 17, 2019, 1:50 p.m. OK GNU C++17 TESTS 45 46 1331200 2200
50761286 about_30_ninjas C March 3, 2019, 7:36 p.m. OK GNU C++17 TESTS 45 46 2662400 2200
50748170 LHiC C March 3, 2019, 4:11 p.m. OK GNU C++17 TESTS 45 46 2764800 2200
50753574 al13n C March 3, 2019, 4:55 p.m. OK GNU C++17 TESTS 45 46 2867200 2200
68312106 WangJialei C Jan. 6, 2020, 11:39 a.m. OK Go TESTS 45 234 100249600 2200
63919004 z20124528 C Oct. 31, 2019, 11:05 a.m. OK Go TESTS 45 234 107008000 2200
69854056 viajero C Jan. 30, 2020, 4:28 p.m. OK Java 11 TESTS 45 482 144793600 2200
69474569 akivanov C Jan. 24, 2020, 3:41 p.m. OK Java 11 TESTS 45 545 144793600 2200
51468552 qiyue C March 19, 2019, 4:24 a.m. OK Java 8 TESTS 45 124 0 2200
50752206 uwi C March 3, 2019, 4:41 p.m. OK Java 8 TESTS 45 155 0 2200
64889606 dalt C Nov. 14, 2019, 2:15 p.m. OK Java 8 TESTS 45 249 46387200 2200
51134153 beroul C March 10, 2019, 3:10 p.m. OK Java 8 TESTS 45 264 191488000 2200
63632585 Vishal_dhanani C Oct. 28, 2019, 6:57 a.m. OK Java 8 TESTS 45 265 0 2200
64979103 dalt C Nov. 15, 2019, 4:37 a.m. OK Java 8 TESTS 45 280 46387200 2200
50998123 Jeel_Vaishnav C March 8, 2019, 5:21 a.m. OK Java 8 TESTS 45 295 0 2200
50800987 4mda4mda C March 4, 2019, 11:19 p.m. OK Java 8 TESTS 45 327 0 2200
50987339 PrakharJain C March 7, 2019, 8:07 p.m. OK Java 8 TESTS 45 343 0 2200
50761329 ZeyadKhattab C March 3, 2019, 7:37 p.m. OK Java 8 TESTS 45 358 145408000 2200
52228808 hongquanntct C April 2, 2019, 11 a.m. OK Mono C# TESTS 45 249 100556800 2200
69085344 tarattata1 C Jan. 19, 2020, 8:05 a.m. OK MS C++ TESTS 45 93 102400 2200
61962595 vjudge2 C Oct. 6, 2019, 7:55 a.m. OK MS C++ TESTS 45 139 100659200 2200
61964995 vjudge3 C Oct. 6, 2019, 8:35 a.m. OK MS C++ TESTS 45 202 144384000 2200
58345087 vjudge2 C Aug. 5, 2019, 2:38 p.m. OK MS C++ TESTS 45 233 100454400 2200
50914881 LoneFox C March 7, 2019, 5:37 a.m. OK MS C++ TESTS 45 1794 25497600 2200
50756465 pajenegod C March 3, 2019, 5:28 p.m. OK PyPy 2 TESTS 45 1949 819200 2200
62869581 gatis C Oct. 18, 2019, 1:21 p.m. OK PyPy 3 TESTS 45 702 113664000 2200
51349146 insane_n00b pradeepdhankhar C March 15, 2019, 8:23 p.m. OK PyPy 3 TESTS 45 763 11366400 2200
50801281 Hokage777 C March 4, 2019, 11:47 p.m. OK PyPy 3 TESTS 45 764 11468800 2200
50763201 vyomkesh C March 3, 2019, 8:59 p.m. OK Python 2 TESTS 45 1809 3686400 2200
67275384 sansen C Dec. 20, 2019, 10 a.m. OK Rust TESTS 45 171 307200 2200

remove filters

Back to search problems