码迷,mamicode.com
首页 >  
搜索关键字:substrings    ( 383个结果
hdu4455 dp
http://acm.hdu.edu.cn/showproblem.php?pid=4455 Substrings Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2229    Accepted Submission(s...
分类:其他好文   时间:2015-07-04 16:47:53    阅读次数:121
CodeForces 550A Two Substrings(模拟)
【题目链接】click here~~  【题目大意】:  You are given string s. Your task is to determine if the given string s contains two non-overlapping substrings “AB” and “BA” (the substrings can go in any order).  Inp...
分类:其他好文   时间:2015-06-27 16:44:19    阅读次数:145
Substrings(hd1238)
SubstringsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8183Accepted Submission(s): 3752Problem ...
分类:其他好文   时间:2015-06-23 15:01:42    阅读次数:142
LeetCode之“动态规划”:Scramble String
题目链接 题目要求: Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively. Below is one possib...
分类:其他好文   时间:2015-06-16 16:08:21    阅读次数:120
【套题】Codeforces#306(div2)[A-C]
A. Two Substrings 题意:问一个字符串中是否同时存在AB和BA,其中AB和BA不能共用同一个B或A。 题解:扫一遍即可。可以考虑如下策略:先找AB,然后从B后的位置继续找BA;再另按BA-AB的顺序找一遍即可。复杂度O(n)O(n)。窝的代码则直接暴力出所有的AB和BA位置,只要出现不重叠的两个就OKOK~数据不大,随便搞。 参考代码: #include <bits/stdc++.h...
分类:其他好文   时间:2015-06-11 09:34:23    阅读次数:263
CodeForces 550A Two Substrings(模拟)
【题目链接】click here~~ 【题目大意】: You are given string s. Your task is to determine if the given string s contains two non-overlapping substrings “AB” and “BA” (the substrings can go in any order). Input...
分类:其他好文   时间:2015-06-09 17:24:38    阅读次数:105
Codeforces550A:Two Substrings
You are given string s. Your task is to determine if the given string s contains two non-overlapping substrings "AB" and "BA" (the substrings can go in any order). Input The only line of...
分类:其他好文   时间:2015-06-09 17:21:51    阅读次数:184
天题系列: Scramble String -- 三维动态规划
题目:Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representat...
分类:其他好文   时间:2015-06-09 06:13:42    阅读次数:93
POJ1226:Substrings(后缀数组)
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 ...
分类:编程语言   时间:2015-06-08 15:03:25    阅读次数:125
POJ3415:Common Substrings(后缀数组+单调栈)
Description A substring of a string T is defined as: T(i, k)=TiTi+1...Ti+k-1, 1≤i≤i+k-1≤|T|. Given two strings A, B and one integer K, we define S, a set of triples (i, j, k): S = {(i, j, ...
分类:编程语言   时间:2015-06-07 23:41:18    阅读次数:391
383条   上一页 1 ... 26 27 28 29 30 ... 39 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!