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 |
---|---|---|---|---|---|---|
1073 | Educational Codeforces Round 53 (Rated for Div. 2) | FINISHED | False | 7200 | 191345099 | Oct. 25, 2018, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 925 ) | G | Yet Another LCP Problem | PROGRAMMING | data structures string suffix structures | 2700 |
B'Let text{LCP}(s, t) be the length of the longest common prefix of strings s and t . Also let s[x ... y] be the substring of s from index x to index y (inclusive). For example, if s = "abcde", then s[1 ... 3] = "abc", s[2 ... 5] = "bcde". You are given a string s of length n and q queries. Each query is a pair of integer sets a_1, a_2, ... , a_k and b_1, b_2, ... , b_l . Calculate sum limits_{i = 1}^{i = k} sum limits_{j = 1}^{j = l}{ text{LCP}(s[a_i ... n], s[b_j ... n])} for each query. The first line contains two integers n and q ( 1 <= n, q <= 2 cdot 10^5 ) -- the length of string s and the number of queries, respectively. The second line contains a string s consisting of lowercase Latin letters ( |s| = n ). Next 3q lines contains descriptions of queries -- three lines per query. The first line of each query contains two integers k_i and l_i ( 1 <= k_i, l_i <= n ) -- sizes of sets a and b respectively. The second line of each query contains k_i integers a_1, a_2, ... a_{k_i} ( 1 <= a_1 < a_2 < ... < a_{k_i} <= n ) -- set a . The third line of each query contains l_i integers b_1, b_2, ... b_{l_i} ( 1 <= b_1 < b_2 < ... < b_{l_i} <= n ) -- set b . It is guaranteed that sum limits_{i = 1}^{i = q}{k_i} <= 2 cdot 10^5 and sum limits_{i = 1}^{i = q}{l_i} <= 2 cdot 10^5 . Print q integers -- answers for the queries in the same order queries are given in the input. Description of queries: '... |
62742 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
57764542 | neal | G | July 25, 2019, 7:34 p.m. | OK | GNU C++11 | TESTS | 125 | 124 | 24473600 | 2700 | |
53567511 | stal_xy23z7b8 | G | April 30, 2019, 1:17 p.m. | OK | GNU C++11 | TESTS | 125 | 171 | 25292800 | 2700 | |
44906737 | test616.cpp | G | Oct. 26, 2018, 11:48 a.m. | OK | GNU C++11 | TESTS | 125 | 187 | 30412800 | 2700 | |
46999448 | AuqaKyz | G | Dec. 14, 2018, 10:42 a.m. | OK | GNU C++11 | TESTS | 125 | 187 | 31436800 | 2700 | |
44979048 | xsc | G | Oct. 28, 2018, 7:38 a.m. | OK | GNU C++11 | TESTS | 125 | 202 | 30412800 | 2700 | |
66229018 | alpc_qleonardo | G | Dec. 3, 2019, 1:42 p.m. | OK | GNU C++11 | TESTS | 125 | 202 | 35635200 | 2700 | |
45912001 | vjudge3 | G | Nov. 18, 2018, 11:57 a.m. | OK | GNU C++11 | TESTS | 125 | 233 | 26624000 | 2700 | |
56164733 | 2829908231 | G | June 27, 2019, 1:49 p.m. | OK | GNU C++11 | TESTS | 125 | 234 | 27340800 | 2700 | |
45158638 | 00zj | G | Nov. 1, 2018, 6:49 a.m. | OK | GNU C++11 | TESTS | 125 | 234 | 29388800 | 2700 | |
52638759 | chc_1234567890 | G | April 12, 2019, 11:31 a.m. | OK | GNU C++11 | TESTS | 125 | 265 | 54886400 | 2700 | |
48657230 | ReaLNero1 | G | Jan. 21, 2019, 3:36 a.m. | OK | GNU C++14 | TESTS | 125 | 124 | 24166400 | 2700 | |
46776043 | neal | G | Dec. 8, 2018, 8:27 p.m. | OK | GNU C++14 | TESTS | 125 | 139 | 24473600 | 2700 | |
46775987 | neal | G | Dec. 8, 2018, 8:24 p.m. | OK | GNU C++14 | TESTS | 125 | 139 | 24473600 | 2700 | |
46629937 | neal | G | Dec. 5, 2018, 1:54 a.m. | OK | GNU C++14 | TESTS | 125 | 139 | 24473600 | 2700 | |
46776048 | neal | G | Dec. 8, 2018, 8:28 p.m. | OK | GNU C++14 | TESTS | 125 | 140 | 24473600 | 2700 | |
46776013 | neal | G | Dec. 8, 2018, 8:26 p.m. | OK | GNU C++14 | TESTS | 125 | 140 | 24473600 | 2700 | |
46577404 | neal | G | Dec. 4, 2018, 9:25 a.m. | OK | GNU C++14 | TESTS | 125 | 202 | 19148800 | 2700 | |
46706665 | jslijin | G | Dec. 7, 2018, 7:36 a.m. | OK | GNU C++14 | TESTS | 125 | 295 | 43110400 | 2700 | |
46467014 | w446506278 | G | Dec. 2, 2018, 4:13 a.m. | OK | GNU C++14 | TESTS | 125 | 295 | 43110400 | 2700 | |
44908511 | ecc | G | Oct. 26, 2018, 12:32 p.m. | OK | GNU C++14 | TESTS | 125 | 296 | 59596800 | 2700 | |
49539688 | Minnakhmetov | G | Feb. 6, 2019, 5:47 p.m. | OK | GNU C++17 | TESTS | 125 | 311 | 54681600 | 2700 | |
44873462 | AryssonFigueiredo | G | Oct. 25, 2018, 4:34 p.m. | OK | GNU C++17 | TESTS | 125 | 312 | 6144000 | 2700 | |
66268670 | hjk1030 | G | Dec. 4, 2019, 11:28 a.m. | OK | GNU C++17 | TESTS | 125 | 343 | 26214400 | 2700 | |
67976043 | toi333 | G | Dec. 30, 2019, 4:57 p.m. | OK | GNU C++17 | TESTS | 125 | 358 | 8089600 | 2700 | |
63218989 | Falcon__ | G | Oct. 23, 2019, 7:18 a.m. | OK | GNU C++17 | TESTS | 125 | 358 | 31436800 | 2700 | |
44890531 | cjtoribio | G | Oct. 26, 2018, 2:57 a.m. | OK | GNU C++17 | TESTS | 125 | 373 | 24166400 | 2700 | |
56721351 | Rahul | G | July 8, 2019, 5:01 p.m. | OK | GNU C++17 | TESTS | 125 | 389 | 11161600 | 2700 | |
44892715 | mxzf0213 | G | Oct. 26, 2018, 4:27 a.m. | OK | GNU C++17 | TESTS | 125 | 390 | 61337600 | 2700 | |
45059964 | Ahmed_Abdellah | G | Oct. 29, 2018, 2:22 p.m. | OK | GNU C++17 | TESTS | 125 | 405 | 29388800 | 2700 | |
44875502 | Benq | G | Oct. 25, 2018, 4:58 p.m. | OK | GNU C++17 | TESTS | 125 | 420 | 19558400 | 2700 | |
44909716 | uwi | G | Oct. 26, 2018, 12:58 p.m. | OK | Java 8 | TESTS | 125 | 467 | 35020800 | 2700 | |
67681849 | dalt | G | Dec. 27, 2019, 6:49 a.m. | OK | Java 8 | TESTS | 125 | 638 | 47616000 | 2700 | |
44904629 | uwi | G | Oct. 26, 2018, 10:50 a.m. | OK | Java 8 | TESTS | 125 | 1793 | 117862400 | 2700 | |
52666718 | vjudge3 | G | April 13, 2019, 5:10 a.m. | OK | MS C++ | TESTS | 125 | 296 | 166297600 | 2700 | |
53292491 | vjudge3 | G | April 25, 2019, 4:11 p.m. | OK | MS C++ | TESTS | 125 | 312 | 29491200 | 2700 | |
52666725 | vjudge4 | G | April 13, 2019, 5:10 a.m. | OK | MS C++ | TESTS | 125 | 312 | 166297600 | 2700 | |
51365738 | Alex__Leaf | G | March 16, 2019, 9:30 a.m. | OK | MS C++ | TESTS | 125 | 327 | 52121600 | 2700 | |
52666722 | vjudge5 | G | April 13, 2019, 5:10 a.m. | OK | MS C++ | TESTS | 125 | 327 | 166297600 | 2700 | |
45500309 | kobae964 | G | Nov. 10, 2018, 7:10 a.m. | OK | Rust | TESTS | 125 | 577 | 133120000 | 2700 | |
45285963 | kobae964 | G | Nov. 4, 2018, 4:40 p.m. | OK | Rust | TESTS | 125 | 702 | 140288000 | 2700 | |
45309528 | kobae964 | G | Nov. 5, 2018, 2:17 a.m. | OK | Rust | TESTS | 125 | 842 | 133120000 | 2700 |
Back to search problems