字符串
花酱_
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Palindromes UVa401 字符串
Root :: Problem Set Volumes :: Volume IV 401 - Palindromes 回文词 我头一回在UVa上写题啊,不知道怎么迅速查询题目。暂时先用这样的格式来标记题目吧。 用字符常量数组来标记镜面字母比较方便啊,这一题提交了4次~ -.- 2次编译错误。 UVa还真是娇气啊。 #include #include #include #原创 2013-02-03 15:25:22 · 446 阅读 · 0 评论 -
Orz教主 bjfu1151 字符串操作
描述 众所周知,楼教主经常一个人单挑一个队,令世界各地的ACMer闻风丧胆。久而久之,Orz教主成为了ACM界的一种文化。现在,几乎每所学校都拥有他们的教主,而且教主总是被Orz。 有一天,某教主收到了一封信。这封信有点特别,因为信中的内容是由O、r、z这三个字母按照不固定的顺序组成的。 教主都喜欢显得自己很弱,所以他不希望在信中看到连续的Orz三个字母,他决定把它们都消掉。 教主每次都找原创 2013-01-20 15:39:44 · 869 阅读 · 1 评论 -
Excuses, Excuses! UVa409 字符串
Root :: Problem Set Volumes :: Volume IV 409 - Excuses, Excuses! 又来了一次编译错误,然后几次WA是因为分隔符不全,最后干脆把非字母全当成分隔符就AC了。 =.= #include #include #include #include #include using namespace std;原创 2013-02-04 13:30:03 · 468 阅读 · 0 评论 -
Vowel Counting hdu3079 字符串水题
http://acm.hdu.edu.cn/showproblem.php?pid=3079 元音变大写,辅音变小写。用了strchr函数。 函数名: strchr 功 能: 在一个串中查找给定字符的第一个匹配之处\ 用 法: char *strchr(char *str, char c); 程序例: #include #include int main(void){ char原创 2013-02-05 17:01:08 · 526 阅读 · 0 评论 -
Online Judge hdu1073 字符串操作
http://acm.hdu.edu.cn/showproblem.php?pid=1073 以后的串操作还是靠char最靠谱。。这是个超水的题。 #include using namespace std; #define MAX 5003 char temp[MAX],a[MAX],b[MAX]; void trim(char *s){ //这才是trim的王道函数,一个char走遍原创 2013-01-20 13:39:43 · 614 阅读 · 0 评论 -
Period hdu1358 KMP
http://acm.hdu.edu.cn/showproblem.php?pid=1358 过了个年。疯玩了很久。一直都没写题。深感惭愧 … 解析参考前辈的博客 http://fudq.blog.163.com/blog/static/19135023820126523434614/ 题意 利用第二组测试数据来解释: input: 12 aabaabaabaab out原创 2013-02-20 19:19:11 · 429 阅读 · 0 评论 -
Number Sequence hdu1711 KMP
http://acm.hdu.edu.cn/showproblem.php?pid=1711 这个是单纯的KMP应用,串匹配~。第一回自己写,照着演示的代码来写的。 #include using namespace std; #define N 1000003 #define M 10003 int a[N],b[M],nextd[M]; void getnext(int len){ n原创 2013-02-21 16:39:39 · 406 阅读 · 0 评论
分享