码迷,mamicode.com
首页 >  
搜索关键字:substrings    ( 383个结果
CodeForces A. Many Equal Substrings
http://codeforces.com/contest/1029/problem/A You are given a string tt consisting of nn lowercase Latin letters and an integer number kk. Let's define ...
分类:其他好文   时间:2018-10-20 21:03:27    阅读次数:202
[LeetCode] 87. 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 representati ...
分类:其他好文   时间:2018-10-16 10:16:48    阅读次数:174
CF914F Substrings in a String
Description 给你一个字符串ss,共有qq次操作,每个都是下面两种形式的一种。 11 ii cc 这个操作表示将字符串ss的第ii项变为字符cc 22 ll rr yy 这个操作表示输出字符串yy在字符串ss中以第ll项为起点,以第rr项为终点的子串(包括第ll和第rr项)中作为子串出现的 ...
分类:其他好文   时间:2018-10-11 21:46:07    阅读次数:181
C - Distinct Substrings (模板)
https://vjudge.net/problem/SPOJ-DISUBSTR 有两种方式来求去除重读的子串 ...
分类:其他好文   时间:2018-10-08 22:19:24    阅读次数:181
【CodeForces 271D】Good Substrings
【链接】 "我是链接,点我呀:)" 【题意】 【题解】 字典树 我们可以两重循环(i,j) 来枚举所有的子串 即i=1,j=1,2,3... i=2,j = 2,3,4,.. 于是我们在i变化的时候(就是j层循环完了,i要执行i+1的时候 令cur=字典树的root 然后沿着字典树往下走。 遇到没有 ...
分类:其他好文   时间:2018-10-03 23:27:46    阅读次数:121
「日常训练」Two Substrings(Codeforces Round 306 Div.2 A)
题意与分析 一道非常坑的水题。分析醒了补。 代码 cpp include define MP make_pair define PB emplace_back define fi first define se second define ZERO(x) memset((x), 0, sizeof( ...
分类:其他好文   时间:2018-10-03 22:26:47    阅读次数:143
UVALive - 4671 K-neighbor substrings (FFT+哈希)
题意:海明距离的定义:两个相同长度的字符串中不同的字符数.现给出母串A和模式串B,求A中有多少与B海明距离 using namespace std; typedef long long LL; const int MAXN = 4e5 + 10; const double PI = acos( 1. ...
分类:其他好文   时间:2018-10-02 14:14:12    阅读次数:204
动态规划-独特的子字符串存在于Wraparound String总个数 Unique Substrings in Wraparound String
2018-09-01 22:50:59 问题描述: 问题求解: 如果单纯的遍历判断,那么如何去重保证unique是一个很困难的事情,事实上最初我就困在了这个点上。 后来发现是一个动态规划的问题,可以将每个字符结尾的最长长度进行保存,这样就巧妙的解决的重复的问题。 ...
分类:其他好文   时间:2018-09-02 02:10:48    阅读次数:169
codeforces 1029 A. Many Equal Substrings
题意:给一个串t,构造一个尽可能长度小字符串,使得这个字符串里有k个子串t 只需要找出最大的前缀和后缀相等的情况即可,刚开始忘记了strstrstrstr的这种情况,用substr方便一点 ...
分类:其他好文   时间:2018-09-01 12:15:32    阅读次数:145
647. Palindromic Substrings
题目描述: Given a string, your task is to count how many palindromic substrings in this string. The substrings with different start indexes or end indexes ...
分类:其他好文   时间:2018-08-26 20:51:24    阅读次数:184
383条   上一页 1 ... 8 9 10 11 12 ... 39 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!