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 |
---|---|---|---|---|---|---|
1562 | Codeforces Round 741 (Div. 2) | FINISHED | False | 8100 | 107277863 | Aug. 26, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1433 ) | E | Rescue Niwen! | PROGRAMMING | dp string suffix structures strings |
B'Rise above the sands of time... After crossing the Windswept Wastes, Ori has finally reached the Windtorn Ruins to find the Heart of the Forest! However, the ancient repository containing this priceless Willow light did not want to open! Ori was taken aback, but the Voice of the Forest explained to him that the cunning Gorleks had decided to add protection to the repository. The Gorleks were very fond of the "string expansion" operation. They were also very fond of increasing subsequences. Suppose a string s_1s_2s_3 ldots s_n is given. Then its "expansion" is defined as the sequence of strings s_1 , s_1 s_2 , ..., s_1 s_2 ldots s_n , s_2 , s_2 s_3 , ..., s_2 s_3 ldots s_n , s_3 , s_3 s_4 , ..., s_{n-1} s_n , s_n . For example, the "expansion" the string 'abcd ' will be the following sequence of strings: 'a ', 'ab ', 'abc ', 'abcd ', 'b ', 'bc ', 'bcd ', 'c ', 'cd ', 'd '. To open the ancient repository, Ori must find the size of the largest increasing subsequence of the "expansion" of the string s . Here, strings are compared lexicographically. Help Ori with this task! A string a is lexicographically smaller than a string b if and only if one of the following holds: Each test contains multiple test cases. The first line contains one positive integer t ( 1 <= t <= 10^3 ), denoting the number of test cases. Description of the test cases follows. The first line of each test case contains one positive integer n ( 1 <= n <= 5000 ) -- length of the string. The second line of each test case contains a non-empty string of length n , which consists of lowercase latin letters. It is guaranteed that the sum of n over all test cases does not exceed 10^4 . For every test case print one non-negative integer -- the answer to the problem. In first test case the "expansion" of the string is: 'a ', 'ac ', 'acb ', 'acba ', 'acbac ', 'c ', 'cb ', 'cba ', 'cbac ', 'b ', 'ba ', 'b'... |
Editorial of Codeforces Round 741 (Div. 2) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
127131031 | rainboy | E | Aug. 26, 2021, 6 p.m. | OK | GNU C11 | TESTS | 84 | 156 | 3788800 | ||
127122598 | wzh_wtt_tietie | E | Aug. 26, 2021, 4:42 p.m. | OK | GNU C++14 | TESTS | 84 | 109 | 4403200 | ||
127161991 | yltx | E | Aug. 27, 2021, 5:29 a.m. | OK | GNU C++14 | TESTS | 84 | 124 | 4096000 | ||
127138020 | ryan.yoshida | E | Aug. 26, 2021, 7:31 p.m. | OK | GNU C++14 | TESTS | 84 | 140 | 4403200 | ||
127146581 | syksykCCC | E | Aug. 27, 2021, 12:37 a.m. | OK | GNU C++14 | TESTS | 84 | 140 | 4915200 | ||
127150224 | final_trump | E | Aug. 27, 2021, 2:08 a.m. | OK | GNU C++14 | TESTS | 84 | 155 | 4300800 | ||
127154844 | ykl | E | Aug. 27, 2021, 3:34 a.m. | OK | GNU C++14 | TESTS | 84 | 155 | 4300800 | ||
127125065 | FormalPowerSeries | E | Aug. 26, 2021, 4:48 p.m. | OK | GNU C++14 | TESTS | 84 | 187 | 4198400 | ||
127145948 | C20211711LJS | E | Aug. 27, 2021, 12:09 a.m. | OK | GNU C++14 | TESTS | 84 | 187 | 4198400 | ||
127136517 | Potassium_ | E | Aug. 26, 2021, 7:06 p.m. | OK | GNU C++14 | TESTS | 84 | 187 | 15872000 | ||
127150146 | _ztyqwq | E | Aug. 27, 2021, 2:06 a.m. | OK | GNU C++14 | TESTS | 84 | 202 | 4505600 | ||
127140608 | Opcode | E | Aug. 26, 2021, 8:29 p.m. | OK | GNU C++17 | TESTS | 84 | 109 | 4096000 | ||
127125517 | CoderAnshu | E | Aug. 26, 2021, 4:49 p.m. | OK | GNU C++17 | TESTS | 84 | 109 | 4198400 | ||
127150817 | daxia | E | Aug. 27, 2021, 2:20 a.m. | OK | GNU C++17 | TESTS | 84 | 109 | 17920000 | ||
127129438 | HomuraCat | E | Aug. 26, 2021, 5:48 p.m. | OK | GNU C++17 | TESTS | 84 | 109 | 120934400 | ||
127127719 | LushCat | E | Aug. 26, 2021, 5:40 p.m. | OK | GNU C++17 | TESTS | 84 | 124 | 4198400 | ||
127144063 | -osdajigu- | E | Aug. 26, 2021, 10:35 p.m. | OK | GNU C++17 | TESTS | 84 | 139 | 4710400 | ||
127125120 | Rafi22 | E | Aug. 26, 2021, 4:48 p.m. | OK | GNU C++17 | TESTS | 84 | 140 | 71065600 | ||
127153199 | _Gabriel | E | Aug. 27, 2021, 3:07 a.m. | OK | GNU C++17 | TESTS | 84 | 140 | 104345600 | ||
127146183 | bjyyx | E | Aug. 27, 2021, 12:19 a.m. | OK | GNU C++17 | TESTS | 84 | 171 | 4915200 | ||
127126075 | niike0goood | E | Aug. 26, 2021, 4:49 p.m. | OK | GNU C++17 | TESTS | 84 | 171 | 5222400 | ||
127124063 | CookieHCl | E | Aug. 26, 2021, 4:46 p.m. | OK | GNU C++17 (64) | TESTS | 84 | 78 | 4403200 | ||
127140063 | Kregor | E | Aug. 26, 2021, 8:15 p.m. | OK | GNU C++17 (64) | TESTS | 84 | 78 | 4505600 | ||
127124653 | edenooo | E | Aug. 26, 2021, 4:47 p.m. | OK | GNU C++17 (64) | TESTS | 84 | 78 | 4505600 | ||
127133527 | mannbou | E | Aug. 26, 2021, 6:25 p.m. | OK | GNU C++17 (64) | TESTS | 84 | 78 | 4505600 | ||
127140386 | Kregor | E | Aug. 26, 2021, 8:23 p.m. | OK | GNU C++17 (64) | TESTS | 84 | 93 | 4505600 | ||
127128444 | Andreasyan | E | Aug. 26, 2021, 5:43 p.m. | OK | GNU C++17 (64) | TESTS | 84 | 93 | 105164800 | ||
127137502 | IceKnight1093 | E | Aug. 26, 2021, 7:23 p.m. | OK | GNU C++17 (64) | TESTS | 84 | 108 | 4608000 | ||
127130683 | MateoCV | E | Aug. 26, 2021, 5:57 p.m. | OK | GNU C++17 (64) | TESTS | 84 | 109 | 4915200 | ||
127128190 | RBurgundy | E | Aug. 26, 2021, 5:41 p.m. | OK | GNU C++17 (64) | TESTS | 84 | 124 | 4608000 | ||
127133119 | Temmie | E | Aug. 26, 2021, 6:20 p.m. | OK | GNU C++17 (64) | TESTS | 84 | 139 | 4403200 | ||
127160308 | mphillotry | E | Aug. 27, 2021, 5:05 a.m. | OK | Java 11 | TESTS | 84 | 811 | 180326400 | ||
127131969 | Dukkha | E | Aug. 26, 2021, 6:08 p.m. | OK | Java 11 | TESTS | 84 | 1013 | 301568000 | ||
127124856 | SecondThread | E | Aug. 26, 2021, 4:48 p.m. | OK | Java 8 | TESTS | 84 | 624 | 295628800 | ||
127143439 | hxu10 | E | Aug. 26, 2021, 10:06 p.m. | OK | PyPy 3 | TESTS | 84 | 1325 | 198041600 | ||
127138233 | silvertint | E | Aug. 26, 2021, 7:35 p.m. | OK | PyPy 3 | TESTS | 84 | 1809 | 224460800 | ||
127132559 | apilat | E | Aug. 26, 2021, 6:14 p.m. | OK | Rust | TESTS | 84 | 638 | 104550400 |
Back to search problems