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 |
---|---|---|---|---|---|---|
1968 | Codeforces Round 943 (Div. 3) | FINISHED | False | 8100 | 22518863 | May 2, 2024, 2:45 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 2043 ) | G2 | Division + LCP (hard version) | PROGRAMMING | binary search brute force data structures dp hashing math string suffix structures strings | 2200 |
B'This is the hard version of the problem. In this version l <= r . You are given a string s . For a fixed k , consider a division of s into exactly k continuous substrings w_1, ... ,w_k . Let f_k be the maximal possible LCP(w_1, ... ,w_k) among all divisions. LCP(w_1, ... ,w_m) is the length of the Longest Common Prefix of the strings w_1, ... ,w_m . For example, if s=abababcab and k=4 , a possible division is color{red}{ab} color{blue}{ab} color{orange}{abc} color{green}{ab} . The LCP( color{red}{ab}, color{blue}{ab}, color{orange}{abc}, color{green}{ab}) is 2 , since ab is the Longest Common Prefix of those four strings. Note that each substring consists of a continuous segment of characters and each character belongs to exactly one substring. Your task is to find f_l,f_{l+1}, ... ,f_r . The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The first line of each test case contains two integers n , l , r ( 1 <= l <= r <= n <= 2 cdot 10^5 ) -- the length of the string and the given range. The second line of each test case contains string s of length n , all characters are lowercase English letters. It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, output r-l+1 values: f_l, ... ,f_r . '... |
129096 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
262036170 | Hirazawa | G2 | May 21, 2024, 2:48 p.m. | OK | C++14 (GCC 6-32) | TESTS | 70 | 140 | 8704000 | 2200 | |
261811155 | Hirazawa | G2 | May 20, 2024, 2:51 p.m. | OK | C++14 (GCC 6-32) | TESTS | 70 | 155 | 8601600 | 2200 | |
263395118 | Wunia | G2 | May 31, 2024, 12:34 a.m. | OK | C++14 (GCC 6-32) | TESTS | 70 | 593 | 14131200 | 2200 | |
263395158 | Wunia | G2 | May 31, 2024, 12:35 a.m. | OK | C++14 (GCC 6-32) | TESTS | 70 | 609 | 14131200 | 2200 | |
263394955 | Wunia | G2 | May 31, 2024, 12:29 a.m. | OK | C++14 (GCC 6-32) | TESTS | 70 | 640 | 14336000 | 2200 | |
263395005 | Wunia | G2 | May 31, 2024, 12:31 a.m. | OK | C++14 (GCC 6-32) | TESTS | 70 | 656 | 14233600 | 2200 | |
261319088 | Jason_chenz | G2 | May 17, 2024, 11:15 a.m. | OK | C++14 (GCC 6-32) | TESTS | 70 | 718 | 0 | 2200 | |
263394022 | Wunia | G2 | May 31, 2024, 12:02 a.m. | OK | C++14 (GCC 6-32) | TESTS | 70 | 734 | 10956800 | 2200 | |
262684827 | Deamer | G2 | May 26, 2024, 9:56 a.m. | OK | C++14 (GCC 6-32) | TESTS | 70 | 749 | 6656000 | 2200 | |
261319121 | Jason_chenz | G2 | May 17, 2024, 11:16 a.m. | OK | C++14 (GCC 6-32) | TESTS | 70 | 765 | 0 | 2200 | |
262973705 | JEdward | G2 | May 28, 2024, 7:23 a.m. | OK | C++17 (GCC 7-32) | TESTS | 70 | 109 | 5734400 | 2200 | |
261795486 | Hirazawa | G2 | May 20, 2024, 2:38 p.m. | OK | C++17 (GCC 7-32) | TESTS | 70 | 139 | 8601600 | 2200 | |
262044634 | sayeedt | G2 | May 21, 2024, 3:52 p.m. | OK | C++17 (GCC 7-32) | TESTS | 70 | 234 | 2457600 | 2200 | |
262116473 | 200815147 | G2 | May 22, 2024, 8:53 a.m. | OK | C++17 (GCC 7-32) | TESTS | 70 | 343 | 5734400 | 2200 | |
262126160 | Jeslan | G2 | May 22, 2024, 10:07 a.m. | OK | C++17 (GCC 7-32) | TESTS | 70 | 374 | 1843200 | 2200 | |
263556778 | Joey_c | G2 | May 31, 2024, 11:32 p.m. | OK | C++17 (GCC 7-32) | TESTS | 70 | 531 | 10649600 | 2200 | |
263628173 | Joey_c | G2 | June 1, 2024, 12:23 p.m. | OK | C++17 (GCC 7-32) | TESTS | 70 | 609 | 10649600 | 2200 | |
263041728 | Dolce_Banana | G2 | May 28, 2024, 4:43 p.m. | OK | C++17 (GCC 7-32) | TESTS | 70 | 624 | 12288000 | 2200 | |
262096389 | rikka_lyly | G2 | May 22, 2024, 6:08 a.m. | OK | C++17 (GCC 7-32) | TESTS | 70 | 655 | 7065600 | 2200 | |
262665161 | jtmaster1000 | G2 | May 26, 2024, 7:21 a.m. | OK | C++17 (GCC 7-32) | TESTS | 70 | 671 | 9011200 | 2200 | |
261526253 | yasseinhamdy15 | G2 | May 18, 2024, noon | OK | C++20 (GCC 13-64) | TESTS | 70 | 108 | 6041600 | 2200 | |
261755870 | nice333 | G2 | May 20, 2024, 9:37 a.m. | OK | C++20 (GCC 13-64) | TESTS | 70 | 108 | 6144000 | 2200 | |
261308326 | Mu_Silk | G2 | May 17, 2024, 9:45 a.m. | OK | C++20 (GCC 13-64) | TESTS | 70 | 109 | 3379200 | 2200 | |
261083434 | ivan100sic | G2 | May 15, 2024, 4:48 p.m. | OK | C++20 (GCC 13-64) | TESTS | 70 | 124 | 0 | 2200 | |
262131871 | fireinferno | G2 | May 22, 2024, 10:57 a.m. | OK | C++20 (GCC 13-64) | TESTS | 70 | 124 | 3993600 | 2200 | |
262385006 | tu144x | G2 | May 24, 2024, 12:33 p.m. | OK | C++20 (GCC 13-64) | TESTS | 70 | 155 | 6041600 | 2200 | |
262222817 | Hamed_Ghaffari | G2 | May 23, 2024, 7:40 a.m. | OK | C++20 (GCC 13-64) | TESTS | 70 | 203 | 2457600 | 2200 | |
261291341 | zltzlt | G2 | May 17, 2024, 7:13 a.m. | OK | C++20 (GCC 13-64) | TESTS | 70 | 203 | 48742400 | 2200 | |
261986265 | goats_9 | G2 | May 21, 2024, 8:56 a.m. | OK | C++20 (GCC 13-64) | TESTS | 70 | 217 | 0 | 2200 | |
262068926 | ericchenxktz | G2 | May 22, 2024, 12:02 a.m. | OK | C++20 (GCC 13-64) | TESTS | 70 | 218 | 20787200 | 2200 | |
262978422 | xylu | G2 | May 28, 2024, 8:04 a.m. | OK | Go | TESTS | 70 | 218 | 4710400 | 2200 | |
262978030 | xylu | G2 | May 28, 2024, 8:01 a.m. | OK | Go | TESTS | 70 | 218 | 4710400 | 2200 | |
262973864 | xylu | G2 | May 28, 2024, 7:24 a.m. | OK | Go | TESTS | 70 | 2265 | 7987200 | 2200 | |
262978555 | xylu | G2 | May 28, 2024, 8:05 a.m. | OK | Go | TESTS | 70 | 2311 | 6348800 | 2200 | |
262976239 | xylu | G2 | May 28, 2024, 7:45 a.m. | OK | Go | TESTS | 70 | 2749 | 7987200 | 2200 | |
261246605 | Sumitsingh7 | G2 | May 16, 2024, 7:29 p.m. | OK | Java 8 | TESTS | 70 | 1437 | 40243200 | 2200 | |
262858260 | yvbf | G2 | May 27, 2024, 9:36 a.m. | OK | Java 8 | TESTS | 70 | 1530 | 0 | 2200 | |
262455518 | pierrot | G2 | May 25, 2024, 4:09 a.m. | OK | PyPy 3-64 | TESTS | 70 | 421 | 18534400 | 2200 | |
262936496 | samoylovboris | G2 | May 27, 2024, 9:53 p.m. | OK | PyPy 3-64 | TESTS | 70 | 561 | 12492800 | 2200 | |
261330880 | JT_7 | G2 | May 17, 2024, 12:48 p.m. | OK | PyPy 3-64 | TESTS | 70 | 1296 | 12595200 | 2200 |
Back to search problems