You are given nn strings. Each string consists of lowercase English letters. Rearrange (reorder) the given strings in such a way that for every string
转载
2018-06-26 16:25:00
49阅读
2评论
题目链接: "戳我" 题目大意:给定一个字符串,它的长度n include include include include define MAXN 2500100 using namespace std; int n,last=1,tot=1; int siz[MAXN],c[MAXN],a[MAX
原创
2021-07-15 11:58:02
96阅读
Problem Description You are given a number of case-sensitive strings of alphabetic characters, find the largest string X, such that either X, or its i
转载
2019-04-08 21:52:00
192阅读
2评论
题意: 给定一个序列ai,个数为n。再给出一系列w;对于每个w,求序列中,所有长度为w的连续子串中的权值和,子串权值为子串中不同数的个数。
转载
2017-04-24 22:17:00
43阅读
2评论
NSUBSTR - Substringsno tagsYou are given a string S which consists of 250000 lowercase latin letters at most. We define F(x) as the maximal number of ...
转载
2015-08-14 18:53:00
30阅读
POJ_1226
这个题目可以枚举长度最小的字符串的所有子串,然后暴搜。但为了练一练后缀数组,所以就用后缀数组写了。
#include<stdio.h>#include<string.h>#define MAXD 20100char b[110];int N, M, h[110], f[MAXD], r[MAXD], rank[MAXD], sa[MAXD], h
转载
2012-02-05 02:09:00
46阅读
2评论
【链接】h在这里写链接【题意】给你n个字符串。让你找一个字符串s.设s'为这个字符串的逆序。要求s或者s'在每个字符串里都能够找得到.并且要求s的长度最长。求出这个最长的串的长度.【题解】把n个串,每个串逆序或者是倒序.顺序加成一个串.(标记一下每个串是属于第几个串..逆序顺序属于同一个串!)(中间...
转载
2017-10-04 18:44:00
85阅读
2评论
题意 给出一个字符串S,令${F(x)}$表示S的所有长度为x的子串出现次数的最大值。求${F(1)......F(length(S))}$ "MashiroSky" 的题解 另外我觉得他的总结写得也不错。 后缀自动机例题,下面写几点自己认为理解后缀自动机的重点。 后缀自动机相对于后缀树就是将Rig
转载
2019-04-08 22:41:00
45阅读
2评论
点击打开链接
二分长度 然后枚举第一个串的所有子串 用kmp判断其是否为其他所有串的子串
#include <bits/stdc++.h>
using namespace std;
const int maxn=1e2+10;
char ch[maxn][maxn];
int len[maxn],nxtt[maxn];
char t[maxn];
int n;
void...
原创
2022-06-15 21:20:24
35阅读
Description
原创
2022-11-10 00:54:07
58阅读
SAM
原创
2023-02-17 01:12:13
19阅读
点击打开链接SubstringsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 655
原创
2022-09-07 16:39:49
58阅读
题目地址:点击打开链接思路:string的子串:string substr(int pos = 0,int n = npos) const;//返回pos开始的n个字符组成的字符串int find(const string &s, int pos = 0) const;//从pos开始查找字符串s在当前串中的位置查找成功时返回所在位置,失败返回string::npos的值AC代
原创
2022-08-04 09:11:44
22阅读
SubstringsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/
原创
2022-08-30 11:27:53
98阅读
Problem Description
You are given a number of case-sensitive string
原创
2022-11-09 18:25:39
38阅读
Description
You are given a number of case-sensitive strings of alphabetic characters, find the largest string X, such that either X, or its inverse can be found as a substring of any of the given
原创
2022-11-09 22:12:14
56阅读
给定一个字符串,求不相同子串个数。每个子串一定是某个后缀的前缀,那么原问题等价于求所有后缀之间的不相同子串个数。总数为n*(n-1)/2,再减掉height[i]的和就是答案 #include<cstdio> #include<cstring> #include<algorithm> using n
转载
2020-02-19 19:11:00
45阅读
2评论
SubstringsTime Limit: 1000msMemory Limit: 10000KBThis problem will be judged onPKU. Original ID:122664-bit integer IO format:%lld Java class name:Main...
转载
2014-08-23 20:45:00
55阅读
题目描述 You are given a string S which consists of 250000 lowercase latin letters at most. We define F(x) as the maximal number of times that some string
转载
2018-02-21 20:33:00
65阅读
2评论
Substrings
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 7699 Accepted Submission(s): 3474
Problem Description
You are given a number
原创
2023-02-20 16:02:45
75阅读