Live2d Test Env

随笔分类 -  字符串

摘要:指针我一般都会出错,所以还是自己写数组版本。 In the modern time, Search engine came into the life of everybody like Google, Baidu, etc. Wiskey also wants to bring this feat 阅读全文
posted @ 2017-10-24 22:52 nimphy 阅读(207) 评论(1) 推荐(0)
摘要:所谓马拉车,和老汉推车毫无关系!!! manacher用于处理对称问题,主要是针对回文串,如:tattarrattat(牛津英语词典中最长的回文单词) HDU3068 ,用char,而不要用string,不然会超s。View Code HDU3294 View Code HDU4513 View C 阅读全文
posted @ 2017-10-23 13:19 nimphy 阅读(274) 评论(0) 推荐(0)
摘要:给定一个字符串S,请统计S的所有子串中,有多少个本质不同的回文字符串? 注意如果两个位置不同的子串满足长度相同且对应字符也都相同,则认为这两个子串本质上是相同的。 Input 一个只包含小写字母的字符串S。 对于30%的数据,S长度不超过100。 对于60%的数据,S长度不超过1000。 对于100 阅读全文
posted @ 2017-10-23 09:08 nimphy 阅读(2771) 评论(0) 推荐(0)
摘要:#include #include #include #include #include using namespace std; int T,trie[110010][10],n,cnt; int f[110010]; char c[12]; bool flag; void _insert() { int L=strlen(c+1),tmp=0; for(int i=1;i... 阅读全文
posted @ 2017-10-18 07:05 nimphy 阅读(152) 评论(0) 推荐(0)
摘要:It is well known that AekdyCoin is good at string problems as well as number theory problems. When given a string s, we can write down all the non-emp 阅读全文
posted @ 2017-10-09 12:23 nimphy 阅读(169) 评论(0) 推荐(0)
摘要:老套路: 阅读全文
posted @ 2017-10-08 19:30 nimphy 阅读(214) 评论(0) 推荐(0)
摘要:是本来想今天写下后缀数组,谁知明天要交高数作业,还有大物视频,英语视频blablabla。。。 赶啊。。。。然后忍不住写了两个kmp水题 每天都要进步 阅读全文
posted @ 2017-10-08 18:57 nimphy 阅读(181) 评论(0) 推荐(0)
摘要:求a串中有多少个b串,可重复使用。 KMP: 阅读全文
posted @ 2017-10-08 18:30 nimphy 阅读(191) 评论(0) 推荐(0)
摘要:后缀树 阅读全文
posted @ 2017-10-07 23:19 nimphy 阅读(120) 评论(0) 推荐(0)
摘要:巧了,昨天刚刚写了个字典树,手到擒来,233。 阅读全文
posted @ 2017-09-30 14:45 nimphy 阅读(176) 评论(0) 推荐(0)
摘要:第一次写字典树,也不晓得写得好不好 阅读全文
posted @ 2017-09-28 16:57 nimphy 阅读(136) 评论(0) 推荐(0)
摘要:strlen能不用就不用#include#include#include#include#include#include#include#includeusing namespace std;char s[100010];int a[30];int main(){ int i,L; while(ge... 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(159) 评论(0) 推荐(0)
摘要:ZOJ2006(最小表示法) 题目大意:输出第一个字符串的最小字典序字串的下标!然后我居然想试一试string的erase的能力,暴力一下,然后20msAC了,尴尬的数据。。。。。。。。。。#include#incl... 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(113) 评论(0) 推荐(0)
摘要:传送门:ZOJ1181 思路:自身排序来判断两个字符串拥有相同的字符。 #include#include#include#include#include#include#include#includeusi... 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(136) 评论(0) 推荐(0)
摘要:代码先寄放这里 #include #include #include #include #include #include using namespace std; int n,m,T=0; mapMap; void _update() { Map.clear(); } void _init1() { string s; for(int i=1;i>s; ... 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(207) 评论(0) 推荐(0)
摘要:错误代码先放这#include#include#include#include#include#includeusing namespace std;mapMap;string s;char C[10000000];int num[100];void _solve(string v){ string... 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(135) 评论(0) 推荐(0)
摘要:Alice bought a lot of pairs of socks yesterday. But when she went home, she found that she has lost one of them. Each sock has a name which contains e 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(245) 评论(0) 推荐(0)
摘要:A common typing error is to place the hands on the keyboard one row to the right of the correct position. So "Q" is typed as "W" and "J" is typed as " 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(106) 评论(0) 推荐(0)
摘要:For each list of words, output a line with each word reversed without changing the order of the words. This problem contains multiple test cases! The 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(201) 评论(0) 推荐(0)