Reprint please indicate the source: http://blog.csdn.net/u012860063? Viewmode = Contents
Question link: http://acm.hdu.edu.cn/showproblem.php? PID = 1, 4847
Problem description
Chen, Adrian (November 7, 2013). "Doge is an ac-tually good internet meme. Wow.". Gawker. Retrieved November 22,201 3.
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 ", "limit 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, SHBA 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 wocould 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 container l 2014, Doge experienced a second major media resurgence due to revelations of the dogecoin community's intent to login sor 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, May 22,201 4, from
Http://en.wikipedia.org/w/index.php? Title = Doge _ (meme) & amp; oldid = 609040691
Now, Doge wants to know how many words "Doge" are there in a given article. wocould you like to help Doge solve this problem? ----------------------------------------------------------------------------
(The above content has nothing to do with this question. You can skip it );
Inputan article that Doge wants to know.
The size of the article does not exceed 64kb. The article contains only ASCII characters. outputplease output the number of word "Doge" (case-
InSensitive). Refer to the samples for more details.
Sample Input
adogecutedo yourge blownDogelovelyDoogeWow!Such Dooooooooooooooge!!!D0gedOge DOGE dogedoge
Sample output
6
Source2014 Xi'an national invitational Competition
The Code is as follows (if you can't lose the answer, you can do it as long as you are brave enough)
#include <cstdio>#include <cstring>int main(){ char s[1000]; int k = 0; while(gets(s)) { int len = strlen(s); if(len < 4) continue; for(int i = 0; i < len; i++) { if(s[i]=='d' || s[i]=='D') { if(s[i+1]=='o' || s[i+1]=='O') { if(s[i+2]=='g' || s[i+2]=='G') { if(s[i+3]=='e' || s[i+3] == 'E') { k++; } } } } } } printf("%d\n",k); return 0;}