hdu4847 Wow! Such Doge! KMP】的更多相关文章

Chen, Adrian (November 7, 2013). “Doge Is An Ac- tually Good Internet Meme. Wow.”. Gawker. Retrieved November 22, 2013. Doge is an Internet meme that became popular in 2013. The meme typically con- sists of a picture of a Shiba Inu dog ac- companied…
题目:hdu4847:Wow! Such Doge! 题目大意:在给出的段落里面找出"doge"出现的次数.大写和小写都能够. 解题思路:字符串匹配问题,能够在之前将字母都转换成统一格式. 代码: #include <stdio.h> #include <string.h> const int N = 1e6; char str[N]; const char *s1 = "doge"; int find () { int sum = 0; c…
Wow! Such Doge! 题意:给定的字符串中doge出现了多少次,直接模拟即可,不用KMP. char s[N]; int main() { // int n; int ans=0; while(gets(s)) { for(int i=0; s[i]!='\0'; i++) if(s[i]>='A'&&s[i]<'z') { if(s[i]=='d'||s[i]=='D') { if(s[i+1]=='o'||s[i+1]=='O') { if(s[i+2]=='g'…
转载请注明出处:http://blog.csdn.net/u012860063?viewmode=contents 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4847 --------------------------------------------------------------------------------------------------------------------------------------------…
http://acm.hdu.edu.cn/showproblem.php?pid=4847 Wow! Such Doge! Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 4847 Description Chen, Adrian (November 7, 2013). “Doge Is An Ac- tually Good Inter…
Wow! Such Doge! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3816    Accepted Submission(s): 2254 Problem Description Chen, Adrian (November 7, 2013). “Doge Is An Ac- tually Good Internet Mem…
Wow! Such Doge! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2351    Accepted Submission(s): 1445 Problem Description Chen, Adrian (November 7, 2013). “Doge Is An Ac- tually Good Internet Mem…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4847 题意就是求给出的文章中共有多少个doge,不区分大小写直接用strstr做就可以了: #include<stdio.h> #include<string.h> #include<algorithm> using namespace std; ; int main() { ; char s[N]; while(gets(s)) { ; s[i]; i++) { if(s…
Problem Description Chen, Adrian (November 7, 2013). "Doge Is An Ac- tually Good Internet Meme. Wow.". Gawker. Retrieved November 22, 2013. Doge is an Internet meme that became popular in 2013. The meme typically con- sists of a picture of a Shi…
题目大意:题目描述了一大堆.....然而并没什么用,其实就是让求给的所有字符串里面有多少个"doge",不区分大小写.   代码如下: ====================================================================================================================== #include<stdio.h> #include<string.h> #include&…