码迷,mamicode.com
首页 >  
搜索关键字:substrings    ( 383个结果
Codeforces Round #306 (Div. 2) (构造)
A. Two Substrings 题意:给一个字符串,求是否含有不重叠的子串"AB"和"BA",长度1e5。 题解:看起来很简单,但是一直错,各种考虑不周全,最后只能很蠢的暴力,把所有的AB和BA的位置求出来,能有一对AB和BA不重叠即可。 1 #include <bits/stdc++.h> 2
分类:其他好文   时间:2016-02-16 16:34:23    阅读次数:214
Substrings--poj1226(字符串)
DescriptionYou are given a number of case-sensitive strings of alphabetic characters, find the largest string X, such that either X, or its inverse ca...
分类:其他好文   时间:2016-01-27 12:31:22    阅读次数:172
spoj 694 Distinct Substrings 后缀数组
题目链接求一个字符串中不相同的子串的个数。子串的总数是(n+1)*n/2, 减去height[i]就可以。#include #include #include #include #include #include #include #include #include #include #includ...
分类:编程语言   时间:2016-01-04 11:40:17    阅读次数:219
LeetCode - Scramble String
题目:Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representa...
分类:其他好文   时间:2016-01-04 08:55:51    阅读次数:208
cf519D . A and B and Interesting Substrings 数据结构map
题意:已知26个小写字母有各自的权值(正,负,或0)现在给出一个字符串,长度#include #include #include #include #include #include #define LL long long#define fir first#define sec secondusi...
分类:其他好文   时间:2015-12-18 06:50:16    阅读次数:124
poj3415 Common Substrings(后缀数组,单调栈)
Common SubstringsTime Limit: 5000MSMemory Limit: 65536KTotal Submissions: 8748Accepted: 2899DescriptionA substrin...
分类:编程语言   时间:2015-11-29 19:33:16    阅读次数:244
hihocoder#1152 : Lucky Substrings
字串处理操作,用到了stl的排序和去重#include #include #include #include #include #include using namespace std;int fib[]={1,2,3,5,8,13,21,34,55,89};vectorsub;int main()...
分类:其他好文   时间:2015-11-20 16:49:03    阅读次数:113
SPOJ8222 Substrings( 后缀自动机 + dp )
题目大意:给一个字符串S,令F(x)表示S的所有长度为x的子串中,出现次数的最大值。F(1)..F(Length(S))建出SAM, 然后求出Right, 求Right可以按拓扑序dp..Right就是某个点到结束状态的路径数, parent树上last的那一条链都是结束状态...然后用Right去...
分类:其他好文   时间:2015-11-16 22:44:14    阅读次数:234
[LintCode] Palindrome Partitioning II
Palindrome Partitioning IIGiven a strings, cutsinto some substrings such that every substring is a palindrome.Return the minimum cuts needed for a pal...
分类:其他好文   时间:2015-11-11 06:21:31    阅读次数:344
87. Scramble String (String; DP)
Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation...
分类:其他好文   时间:2015-10-30 20:12:45    阅读次数:207
383条   上一页 1 ... 23 24 25 26 27 ... 39 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!