码迷,mamicode.com
首页 >  
搜索关键字:poj1226 substrings    ( 386个结果
LeetCode 696. Count Binary Substrings
Give a string s, count the number of non-empty (contiguous) substrings that have the same number of 0's and 1's, and all the 0's and all the 1's in th ...
分类:其他好文   时间:2017-12-27 19:40:46    阅读次数:98
[LeetCode] 87. Scramble String Java
题目: 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 represen ...
分类:编程语言   时间:2017-12-15 21:35:06    阅读次数:216
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 are c ...
分类:其他好文   时间:2017-12-15 13:29:21    阅读次数:126
POJ3693Maximum repetition substring (后缀数组+RMQ)(占位)
The repetition number of a string is defined as the maximum number R such that the string can be partitioned into R same consecutive substrings. For e ...
分类:编程语言   时间:2017-12-10 15:16:36    阅读次数:177
SPOJ705 Distinct Substrings (后缀自动机&后缀数组)
Given a string, we need to find the total number of its distinct substrings. Input T- number of test cases. T<=20;Each test case consists of one strin ...
分类:编程语言   时间:2017-12-10 11:17:03    阅读次数:176
●SPOJ 8222 NSUBSTR - Substrings
题链: http://www.spoj.com/problems/NSUBSTR/ 题解: 后缀自动机的水好深啊!懂不了相关证明,带着结论把这个题做了。看来这滩深水要以后再来了。 本题要用到一个叫 Right[P] 的数组,表示 P对应的子串在原串中出现的所有位置的末尾位置下标的集合。本题中,用这个... ...
分类:其他好文   时间:2017-12-05 18:46:06    阅读次数:136
SPOJ 694 || 705 Distinct Substrings ( 后缀数组 && 不同子串的个数 )
题意 : 对于给出的串,输出其不同长度的子串的种类数 分析 : 有一个事实就是每一个子串必定是某一个后缀的前缀,换句话说就是每一个后缀的的每一个前缀都代表着一个子串,那么如何在这么多子串or后缀的前缀中找出不同的并计数呢?思路就是所有的可能子串数 - 重复的子串数。首先我们容易得到一个长度为 len ...
分类:编程语言   时间:2017-11-21 01:13:13    阅读次数:261
LeetCode 696. Count Binary Substrings
Give a string s, count the number of non-empty (contiguous) substrings that have the same number of 0's and 1's, and all the 0's and all the 1's in th ...
分类:其他好文   时间:2017-11-17 17:01:49    阅读次数:132
atcoder CODE FESTIVAL 2017 qual C D - Yet Another Palindrome Partitioning
Problem Statement We have a string s consisting of lowercase English letters. Snuke is partitioning s into some number of non-empty substrings. Let th ...
分类:其他好文   时间:2017-11-03 22:03:57    阅读次数:273
696. Count Binary Substrings
Give a string s, count the number of non-empty (contiguous) substrings that have the same number of 0's and 1's, and all the 0's and all the 1's in th ...
分类:其他好文   时间:2017-10-24 11:33:52    阅读次数:128
386条   上一页 1 ... 14 15 16 17 18 ... 39 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!