![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
字符串
larry6799
西安电子科技大学
展开
-
ACM 字符串算法
1.Hash算法2.最小循环表示算法3.Manacher算法4.KMP算法5.拓展KMP算法6.字典树7.AC自动机8.后缀数组9.后缀自动机原创 2018-09-27 20:41:31 · 200 阅读 · 0 评论 -
有一个字符串只由字母和数字组成,求第一个出现次数最多的字符 C++
#include<cstdio>#include<cstring>using namespace std;int a[80]={0};char str[1010];int main(){ scanf("%s",str); int len=strlen(str),max=0; for(int i=0;i<len;i++){ a[str[i]-'0...原创 2019-04-03 00:56:27 · 702 阅读 · 0 评论 -
最长回文子串的几种解法
1.动态规划 O()#include<cstdio>#include<cstring>#include<algorithm>using namespace std;const int maxn=101;char str[maxn];int dp[maxn][maxn];int main(){ gets(str); int len=str...原创 2019-03-21 20:18:14 · 164 阅读 · 0 评论 -
hdu_3068 最长回文 manacher算法
最长回文Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 30689 Accepted Submission(s): 11262Problem Description给出一个只由小写英文字符a,b,c...y,z组成的字符...原创 2018-09-29 23:12:59 · 88 阅读 · 0 评论 -
UVA_1225 Digit Counting 算法竞赛入门经典
题目链接:https://cn.vjudge.net/problem/UVA-1225Sample Input2313Sample Output0 1 1 1 0 0 0 0 0 01 6 2 2 1 1 1 1 1 1#include<iostream>#include<cstring>#include<algorithm>us...原创 2018-10-06 23:43:50 · 117 阅读 · 0 评论 -
UVA_1586 Molar mass 算法竞赛入门经典
题目链接:https://cn.vjudge.net/problem/UVA-1586Sample Input4CC6H5OHNH2CH2COOHC12H22O11Sample Output12.01094.10875.070342.296#include<iostream>#include<cstdio>#include<cs...原创 2018-10-06 22:12:41 · 130 阅读 · 0 评论 -
UVa_1585 Score 算法竞赛入门经典
There is an objective test result such as “OOXXOXXOOO”. An ‘O’ means a correct answer of a problemand an ‘X’ means a wrong answer. The score of each problem of this test is calculated by itself and...原创 2018-10-06 20:52:42 · 273 阅读 · 0 评论 -
UVA_156 Ananagrams 算法竞赛入门经典
Most crossword puzzle fans are used to anagrams — groups of words with the same letters in differentorders — for example OPTS, SPOT, STOP, POTS and POST. Some words however do not have thisattribut...原创 2018-10-06 20:19:01 · 185 阅读 · 0 评论 -
UVA _10815 Andy's First Dictionary 算法竞赛入门经典
Andy, 8, has a dream - he wants to produce hisvery own dictionary. This is not an easy task forhim, as the number of words that he knows is,well, not quite enough. Instead of thinking up allthe w...原创 2018-10-06 17:40:36 · 107 阅读 · 0 评论 -
POJ 1002 487-3279
DescriptionBusinesses like to have memorable telephone numbers. One way to make a telephone number memorable is to have it spell a memorable word or phrase. For example, you can call the University ...原创 2019-07-01 21:48:06 · 187 阅读 · 0 评论