随笔分类 - 字符串处理类
摘要:题目地址:http://poj.org/problem?id=1961Sample Input3aaa12aabaabaabaab0Sample OutputTest case #12 23 3Test case #22 26 29 312 4题目分析:给你一个字符串,最大长度1百万。输出是:以第1...
阅读全文
摘要:Power StringsTime Limit: 3000MSMemory Limit: 65536KTotal Submissions: 38038Accepted: 15740DescriptionGiven two strings a and b we define a*b to be th...
阅读全文
摘要:题目:http://poj.org/problem?id=3080Sample Input32GATACCAGATACCAGATACCAGATACCAGATACCAGATACCAGATACCAGATACCAGATAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...
阅读全文
摘要:#1152 : Lucky Substrings时间限制:10000ms单点时限:1000ms内存限制:256MB描述A string s is LUCKY if and only if the number of different characters in s is a fibonacci n...
阅读全文
摘要:Surprising StringsTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 6193Accepted: 4036DescriptionThe D-pairs of a string of letters are the ord...
阅读全文
摘要:ID CodesTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 6229Accepted: 3737DescriptionIt is 2084 and the year of Big Brother has finally arriv...
阅读全文
摘要:#1052 : 基因工程时间限制:1000ms单点时限:1000ms内存限制:256MB描述小Hi和小Ho正在进行一项基因工程实验。他们要修改一段长度为N的DNA序列,使得这段DNA上最前面的K个碱基组成的序列与最后面的K个碱基组成的序列完全一致。 例如对于序列"ATCGATAC"和K=2,可以通过...
阅读全文
摘要:转载地址:http://blog.csdn.net/kangroger/article/details/37742639回文是指正着读和倒着读,结果一些样,比如abcba或abba。题目是要在一个字符串中要到最长的回文子串。1、暴力法最容易想到的就是暴力破解,求出每一个子串,之后判断是不是回文,找到...
阅读全文
摘要:#1103 : Colorful Lecture Note时间限制:10000ms单点时限:1000ms内存限制:256MB描述Little Hi is writing an algorithm lecture note for Little Ho. To make the note more co...
阅读全文
摘要:#1039 : 字符消除时间限制:1000ms单点时限:1000ms内存限制:256MB描述小Hi最近在玩一个字符消除游戏。给定一个只包含大写字母"ABC"的字符串s,消除过程是如下进行的:1)如果s包含长度超过1的由相同字母组成的子串,那么这些子串会被同时消除,余下的子串拼成新的字符串。例如"AB...
阅读全文
摘要:#1082 : 然而沼跃鱼早就看穿了一切时间限制:1000ms单点时限:1000ms内存限制:256MB描述fjxmlhx每天都在被沼跃鱼刷屏,因此他急切的找到了你希望你写一个程序屏蔽所有句子中的沼跃鱼(“marshtomp”,不区分大小写)。为了使句子不缺少成分,统一换成 “fjxmlhx” 。输...
阅读全文
摘要://模拟字符串定位函数// s: abcbbghi// t: ghi// 返回6#include #include #include using namespace std;int main(){ string s, t; int len1, len2; int i, j; ...
阅读全文
摘要:周游列国Time Limit: 1000ms Memory limit: 32768K有疑问?点这里^_^题目描述 大家都知道孔子吧,春秋战国时候的一个老头儿。当时出国还不用护照,所以他经常赶着牛车带着弟子们周游列国。可是这路也并不是那么好走的,当遇到高山时孔子他们就得绕着走了,你得考虑他牛车的...
阅读全文
摘要:串结构练习——字符串匹配Time Limit: 1000MS Memory limit: 65536K题目描述给定两个字符串string1和string2,判断string2是否为string1的子串。输入输入包含多组数据,每组测试数据包含两行,第一行代表string1,第二行代表string2,s...
阅读全文
摘要:人品,有木有?Time Limit: 1000ms Memory limit: 32768K有疑问?点这里^_^题目描述 新一届的山东理工大学ACM网络擂台赛就要开始啦!听说晋级的选手有机会参加现场赛拿奖呢!闻讯好多同学报了名。作为比赛的组织者和命题者,我们当然希望更多的同学能够加入到这样的竞赛...
阅读全文
摘要:数格子算面积Time Limit: 1000MS Memory limit: 262144K题目描述给你一个多边形(用’\’和’/’表示多边形的边),求多边形的面积。输入第一行两个正整数h和w (2 ≤ h, w ≤ 100),h是多边形所在平面的高,w是多边形所在平面的宽,接下来h行,每行w个字符...
阅读全文
摘要:InputInput contains a single line with all labels of the requested goods (in random order). Each kind of goods is represented by the starting letter o...
阅读全文
摘要:数据结构实验之栈:行编辑器Time Limit: 1000ms Memory limit: 65536K有疑问?点这里^_^题目描述一个简单的行编辑程序的功能是:接受用户从终端输入的程序或数据,并存入用户的数据区。由于用户在终端上进行输入时,不能保证不出差错,因此,若在编辑程序中,“每接受一个字符即...
阅读全文
摘要:WERTYUTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 8371Accepted: 4007Description A common typing error is to place the hands on the keyboa...
阅读全文
摘要:#include #include #include #include using namespace std;int main(){ char s[1000]; char t[1000]; int len; int i, j; memset(s, '\0', sizeof(s)); m...
阅读全文

浙公网安备 33010602011771号