Codeforces Round 943 (Div. 3)

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.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4430 ) G1 Division + LCP (easy version) PROGRAMMING binary search data structures dp hashing string suffix structures strings 1900

B'This is the easy 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 . In this version l=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 . In the first sample n=k , so the only division of aba is color{red}a color{blue}b color{orange}a . The answer is zero, because those strings do not have a common prefix. In the second sample, the only division is color{red}a color{blue}a color{orange}a . Their longest common prefix is one. '...

Tutorials

129096

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
262332861 TRYING_To_Do_Better__ G1 May 24, 2024, 4:31 a.m. OK C++14 (GCC 6-32) TESTS 213 77 0 1900
262122338 diyora13 G1 May 22, 2024, 9:38 a.m. OK C++14 (GCC 6-32) TESTS 213 77 0 1900
262976945 yaminimaganti1822 G1 May 28, 2024, 7:51 a.m. OK C++14 (GCC 6-32) TESTS 213 77 102400 1900
263200198 gardenbetweens G1 May 30, 2024, 5:04 a.m. OK C++14 (GCC 6-32) TESTS 213 77 1638400 1900
261570967 leodicaprio4791 G1 May 18, 2024, 6:43 p.m. OK C++14 (GCC 6-32) TESTS 213 77 13824000 1900
261570740 leodicaprio4791 G1 May 18, 2024, 6:39 p.m. OK C++14 (GCC 6-32) TESTS 213 77 13824000 1900
261310824 Jason_chenz G1 May 17, 2024, 10:04 a.m. OK C++14 (GCC 6-32) TESTS 213 92 0 1900
262779566 lzm_555994 G1 May 26, 2024, 4:38 p.m. OK C++14 (GCC 6-32) TESTS 213 92 819200 1900
261755659 lanyu125 G1 May 20, 2024, 9:36 a.m. OK C++14 (GCC 6-32) TESTS 213 93 0 1900
261333957 FV22 G1 May 17, 2024, 1:12 p.m. OK C++14 (GCC 6-32) TESTS 213 93 0 1900
263090546 oath G1 May 29, 2024, 5:37 a.m. OK C++17 (GCC 7-32) TESTS 213 61 0 1900
263204740 Joey_c G1 May 30, 2024, 6:20 a.m. OK C++17 (GCC 7-32) TESTS 213 62 0 1900
262861175 Abhishek_821023 G1 May 27, 2024, 10:01 a.m. OK C++17 (GCC 7-32) TESTS 213 62 0 1900
262860284 Abhishek_821023 G1 May 27, 2024, 9:53 a.m. OK C++17 (GCC 7-32) TESTS 213 62 0 1900
262701268 1729_prism G1 May 26, 2024, 12:10 p.m. OK C++17 (GCC 7-32) TESTS 213 62 0 1900
262313446 iLLuSiOnZ G1 May 23, 2024, 9:20 p.m. OK C++17 (GCC 7-32) TESTS 213 62 0 1900
262214020 dull_coder G1 May 23, 2024, 3:49 a.m. OK C++17 (GCC 7-32) TESTS 213 62 0 1900
261437197 INeedATicketToCapital G1 May 17, 2024, 9:53 p.m. OK C++17 (GCC 7-32) TESTS 213 62 0 1900
262014353 paperba1l G1 May 21, 2024, 12:19 p.m. OK C++17 (GCC 7-32) TESTS 213 62 102400 1900
261333064 R2718 G1 May 17, 2024, 1:05 p.m. OK C++17 (GCC 7-32) TESTS 213 62 102400 1900
262102450 afvikas G1 May 22, 2024, 7:02 a.m. OK C++20 (GCC 13-64) TESTS 213 62 0 1900
261281369 nwtdrt G1 May 17, 2024, 5:32 a.m. OK C++20 (GCC 13-64) TESTS 213 62 0 1900
263671304 Krispy G1 June 1, 2024, 6:40 p.m. OK C++20 (GCC 13-64) TESTS 213 62 102400 1900
263600234 Airths G1 June 1, 2024, 8:39 a.m. OK C++20 (GCC 13-64) TESTS 213 62 102400 1900
261272693 tai_xiu G1 May 17, 2024, 4:08 a.m. OK C++20 (GCC 13-64) TESTS 213 62 512000 1900
263230831 Hirro G1 May 30, 2024, 11:33 a.m. OK C++20 (GCC 13-64) TESTS 213 62 1638400 1900
261270399 lxy__ G1 May 17, 2024, 3:32 a.m. OK C++20 (GCC 13-64) TESTS 213 62 1843200 1900
262079907 Bswoalwo G1 May 22, 2024, 3:01 a.m. OK C++20 (GCC 13-64) TESTS 213 62 3276800 1900
263056133 RNG G1 May 28, 2024, 6:59 p.m. OK C++20 (GCC 13-64) TESTS 213 77 0 1900
262708898 heavenMOJANG G1 May 26, 2024, 1:17 p.m. OK C++20 (GCC 13-64) TESTS 213 77 0 1900
261650542 Temurkan G1 May 19, 2024, 12:22 p.m. OK GNU C11 TESTS 213 93 1945600 1900
261650155 Temurkan G1 May 19, 2024, 12:19 p.m. OK GNU C11 TESTS 213 109 1945600 1900
262962375 xylu G1 May 28, 2024, 5:40 a.m. OK Go TESTS 213 171 4710400 1900
261448833 october_rain G1 May 18, 2024, 2:45 a.m. OK Haskell TESTS 213 1217 49356800 1900
261543449 c1415926 G1 May 18, 2024, 2:33 p.m. OK Java 21 TESTS 213 296 921600 1900
262273798 daksh_02 G1 May 23, 2024, 2:35 p.m. OK Java 21 TESTS 213 296 1433600 1900
261214918 Sumitsingh7 G1 May 16, 2024, 2:57 p.m. OK Java 8 TESTS 213 187 0 1900
263071490 dgucs826 G1 May 28, 2024, 11:43 p.m. OK Java 8 TESTS 213 609 0 1900
261585789 Nullz G1 May 18, 2024, 11:42 p.m. OK PyPy 3-64 TESTS 213 156 5529600 1900
262452068 pierrot G1 May 25, 2024, 3:18 a.m. OK PyPy 3-64 TESTS 213 187 6451200 1900
261790573 gebeng G1 May 20, 2024, 2:03 p.m. OK PyPy 3-64 TESTS 213 234 8089600 1900
262936091 samoylovboris G1 May 27, 2024, 9:44 p.m. OK PyPy 3-64 TESTS 213 249 9216000 1900
261284300 123Summertime G1 May 17, 2024, 6:05 a.m. OK PyPy 3-64 TESTS 213 296 10956800 1900
261500156 tomasnyberg G1 May 18, 2024, 9:28 a.m. OK PyPy 3-64 TESTS 213 359 12902400 1900
262445179 pierrot G1 May 25, 2024, 12:25 a.m. OK PyPy 3-64 TESTS 213 592 20992000 1900
263665062 the_last_smilodon G1 June 1, 2024, 5:41 p.m. OK PyPy 3-64 TESTS 213 609 59187200 1900
262473936 Taymyr G1 May 25, 2024, 7:12 a.m. OK PyPy 3-64 TESTS 213 1312 20275200 1900

remove filters

Back to search problems