
字符串处理
nike0good
这个作者很懒,什么都没留下…
展开
-
Codejam Round 3 2020(Naming Compromise-DP)
ProblemCameron and Jamie are about to welcome a second baby into their lives. They are already good at working together as parents, but right now they are disagreeing about one crucial thing! Cameron wants to name the baby one name (the string C), whereas原创 2020-06-07 17:17:10 · 355 阅读 · 0 评论 -
hiho 挑战赛7(正则表达式-栈)
题目1 : 正则表达式时间限制:1000ms单点时限:1000ms内存限制:256MB描述给定一个字符串,判断其是否为合法的正则表达式。 一个正则表达式定义为: 1:0是正则表达式,1也是正则表达式。 2:P和Q都是正则表达式,则PQ是正则表达式。 3:P是正则表达式,则(P)是正则表达式 4:P是正则表达式,则P*也原创 2015-01-19 14:34:10 · 1608 阅读 · 0 评论 -
CF 505A(Mr. Kitayuta's Gift-回文串)
A. Mr. Kitayuta's Gifttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMr. Kitayuta has kindly given you a s原创 2015-01-19 14:46:10 · 1390 阅读 · 0 评论 -
ACdream 1125(ACfun-字典序)
A - ACfunTime Limit: 2000/1000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others)SubmitStatusProblem DescriptionAs a former ACMer, "AC" is a special abbreviated word which can原创 2014-07-12 00:14:54 · 1818 阅读 · 2 评论 -
CF 312A(Whose sentence is it?-strstr(s,p))
A. Whose sentence is it?time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne day, liouzhou_101 got a chat r原创 2013-05-27 13:40:42 · 1534 阅读 · 0 评论 -
CF 254C(易位构字法)
C. 易位构字法time limit per test1 secondmemory limit per test256 megabytesinputinput.txtoutputoutput.txt异位构字就是把一个字符串的顺序改变,可以得到另一个字符串.对字符串 s 和 t ,至少修改 s 多少位,能使 s原创 2012-12-09 22:41:38 · 1317 阅读 · 0 评论 -
传纸条(看清题目)
传纸条(message)【题目描述】小N和小A上课喜欢传纸条。传纸条是有风险的,为了在老师发现的时候不知道他们在讨论什么内容,他们发明了一系列的加密方式。其中有一种是这样的:一个数字由两个字符串a和b表达,这个数字就是b在a中匹配的位置。比如,a=”abcd”,b=”c”,那么这个数字就是3。但是这样会出现一个问题,a和b能够表达两个不同的数字:比如,a=“ababa”,b=”原创 2012-11-09 10:02:24 · 2085 阅读 · 2 评论 -
幸运字符串(ansistring)
幸运字符串(string)【问题描述】对于一个只包含0和1的字符串,如果A是幸运的,B也是幸运的,那么1AB1也是一个幸运的串。现在定义”0”是一个幸运字符串,请判断给定的字符串S是否是幸运的。【输入格式】第一行一个数字T,表示数据组数。接下来T组数据,第一行字符串长度n,接下来一行一个只含01的字符串。【输出格式】T行,第i个串如果是幸运字符串那么输出”YES”,否则原创 2012-11-09 10:03:52 · 1994 阅读 · 0 评论 -
POJ 1951(空串特判)
这题的教训是 要特判空串Program P1951;var s:string; len,i,j:longint; b:array[0..10000] of boolean;function isdight(x:longint):boolean;begin if (x>=65) and (x<=90) then exit(false); if (x原创 2012-09-15 17:39:09 · 2578 阅读 · 0 评论 -
POJ 2271(HTML)
这题字符串处理注意Seekeof会自动把后面的空格吃掉(有时遇到回车,后面会漏一个空格……貌似有时没空格也会读到,字符串处理时慎用)另外 空格的Ascii码是32,31及以下都是不可输入字符program P2271;var s:string;procedure cin;var c:char; i,len:longint;begin s:原创 2012-09-29 14:02:50 · 905 阅读 · 0 评论 -
POJ 1002(字符串处理)
这题就是字符串处理Program P1002;Type phone=record num,s:longint; end;var n,i,j,p:Longint; b:boolean; s:ansistring; a:array[0..9999999] of longint;// f:array[1..10000原创 2012-08-07 17:13:59 · 1277 阅读 · 0 评论