HDU 4847 Wow! Such Doge! (注意输入格式!)

Wow! Such Doge!

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)

Total Submission(s): 1628    Accepted Submission(s): 1014

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 Shiba Inu dog ac- companied by multicolored text in Comic Sans MS font in the foreground. The text, representing a kind of internal monologue, is deliberately
written in broken English, and usually contains the word “wow” and the phrases “such x”, “much x”, “many x”, “very x” and “so x”.

Kabosu, the Shiba Inu featured in the original meme, was first pictured in a 2010 blog post by Atsuko Sato, a Japanese kindergarten teacher. Afterwards, varia- tions of the pictures using overlaid Comic Sans text were posted from a Tumblr blog, Shiba Confessions.
However, the use of the intentionally misspelled “doge” dates back to June 2005, when it was mentioned in an episode of Homestar Runners puppet series.

In August 2013, images of the meme were spammed on Reddit’s r/MURICA subreddit by 4chan’s random imageboard, /b/. A search of the term doge on Google Trends shows an explosion of popularity occurring in October 2013, and more so in the following month. By November
2013, the meme had become widespread on the Internet. Google later created a Doge Easter egg: when doge meme was entered into the YouTube search bar, all of the site’s text would be displayed in colorful Comic Sans, similar to the kind used by the meme.

The meme was ranked #12 on MTV’s list of “50 Things Pop Culture Had Us Giving Thanks For” in 2013. Io9 compared the internal dialog of the Shiba Inu dogs to lolcat-speak. The image most commonly associated with the meme is of a female Shiba Inu named Kabosu,
taken from a Japanese blog documenting the dog’s daily activities. The spelling of doge has several variants, leading to debate on its actual pronunciation. On December 13, Doge was named the “top meme” of 2013 by Know Your Meme.

In December 2013, the Dogecoin was introduced as a new cryptocurrency, making it the first cryptocurrency to be based on an Internet meme; the viral phenomenon, along with usage of the Comic Sans MS typeface, gave it “the Internet density of a large star” according
to Medium writer Quinn Norton.

In late December 2013, members of the U.S. Congress produced material in the meme’s style. Huffington Post commented that Doge was “killed” because of the Congress members’ usage of the meme.

By early 2014, Doge’s popularity was sustained by internet communities on social media, accompanied by the rapid growth and acceptance of Dogecoin. In April 2014, Doge experienced a second major media resurgence due to revelations of the Dogecoin community’s
intent to sponsor Josh Wise in NASCAR and place a picture of the Shiba Inu on his vehicle.

—— Doge (meme). (2014, May 18).

In Wikipedia, The Free Encyclopedia. Retrieved 02:00, May 22, 2014, from

http://en.wikipedia.org/w/index.php?title=Doge_(meme)&oldid=609040691

Now, Doge wants to know how many words “doge” are there in a given article. Would you like to help Doge solve this problem?

Input

An article that Doge wants to know.

The size of the article does not exceed 64KB. The article contains only ASCII characters.

Output

Please output the number of word “doge” (case-insensitive). Refer to the samples for more details.

Sample Input

adoge
cutedo
yourge
blownDoge
lovelyDooge
Wow!	Such Dooooooooooooooge!!!
D0ge
dOge DOGE
dogedoge

Sample Output

6

Source

2014西安全国邀请赛

原题链接:http://acm.hdu.edu.cn/showproblem.php?pid=4847

水题!就看输入的字母中有多少个"doge",大小写不限,但是结束的要按ctrl + z 才有结果!!

和HDU2090差不多,那题题解:http://blog.csdn.net/hurmishine/article/details/51356755

AC代码:

#include <iostream>
#include <cstring>
using namespace std;
char a[1000];
int main()
{
    int sum=0;
    while(cin>>a)
    {
        int len=strlen(a);
        for(int i=0;i<len-3;i++)
        {
            //doge
            if((a[i]=='D'||a[i]=='d')&&(a[i+1]=='O'||a[i+1]=='o')&&(a[i+2]=='G'||a[i+2]=='g')&&(a[i+3]=='E'||a[i+3]=='e'))
            {
                sum++;
            }
        }
    }
    cout<<sum<<endl;
}
时间: 2024-10-07 03:53:28

HDU 4847 Wow! Such Doge! (注意输入格式!)的相关文章

hdu 4847 Wow! Such Doge! 水题

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4847 统计文本中一共有多少个“Doge” 水题 #include <cstring> #include <cstdlib> #include <cstring> #include <cmath> #include <algorithm> #include <iostream> #include <cstdio> #includ

HDOJ(HDU) 4847 Wow! Such Doge!(doge字符统计)

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

HDU ACM 4847 Wow! Such Doge! 被水题坑了

分析:水题,题目居然这么长,全国邀请赛也有水题?strlen(a)返回的是无符号整形,strlen(a)-4会变为正的很大的数,还被RE了两次,唉!人老了.转换为int即可. #include<iostream> using namespace std; #define N 1000010 int main() { char a[N+10]; int ans,i; ans=0; while(gets(a)) { for(i=0;i<strlen(a);i++) if(a[i]>='

随手练——HDU 1237 表达式求值(输入格式典型)

坑了老子半天,结果是 float 范围不够!!! 基本思想: 将当前符号与栈顶符号进行对比,如果当前符号优先级小于栈顶符号,数字栈弹出两个数进行栈顶符号运算,继续和当前栈顶符号比较,直到当前符号优先级大于栈顶符号,再将当前元素入栈. 符号栈初始放置一个'#',并规定 '#',优先级低于任何符号. 表达式求值是老问题了,但是之前做的也不太完善,很多小地方还是没注意到,WA了好几次. 1. 终止条件,if (s.length() == 1 && s[0] == '0') break; 否则0+

HDU 4847 陕西邀请赛A(水)

HDU 4847 Wow! Such Doge! 题目链接 题意:给定文本,求有几个doge,不区分大小写 思路:水题,直接一个个读字符每次判断即可 代码: #include <stdio.h> #include <string.h> char c; char a[5]; int main() { a[5] = '\0'; int ans = 0; while ((c = getchar()) != EOF) { if (c >= 'a' && c <=

(KMP 水)Wow! Such Doge! -- hdu -- 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

(KMP 水)Wow! Such Doge! -- hdu

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

hdu4847 Wow! Such Doge!(此题简单+坑爹的输入)

转载请注明出处:http://blog.csdn.net/u012860063?viewmode=contents 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4847 Problem Description Chen, Adrian (November 7, 2013). "Doge Is An Ac- tually Good Internet Meme. Wow.". Gawker. Retrieved November 22, 2

hdu4847 Wow! Such Doge!(简单题+坑爹的输入)

转载请注明出处:http://blog.csdn.net/u012860063?viewmode=contents 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4847 --------------------------------------------------------------------------------------------------------------------------------------------