近几年汉语中的狗文化好像变了,样例过了

#Self-mocker

与宠物关系亲密是好事,不仅可以温暖自己也可以温暖他人。

Andy's First Dictionary ,样例过了,一直WA,求大佬指教

How Many Maos Does the Guanxi Worth
Problem Description
"Guanxi" is a very important word in Chinese. It kind of means "relationship" or "contact". Guanxi can be based on friendship, but also can be built on money. So Chinese often say "I don't have one mao guanxi with you." or "The guanxi between them is naked money guanxi." It is said that the Chinese society is a guanxi society, so you can see guanxi plays a very important role in many things.

自嘲

 温暖自己~经常看到微信上很多人与狗狗的亲密照,狗狗的呆萌,恶搞,帮狗狗洗澡,喂它吃饭,双十一替其抢狗粮,碎碎念它的囧事趣事…讲的时候兴致勃勃,眉飞色舞,想来是因为这些细节温暖了自己,恋的欢喜的回味的是当时的那缕暖意。记得看过一个报道,说是与社会脱离太久的人寿命一般比较短。而如果有宠物陪伴,则可以增长寿命。所以,养个宠物,与它关系亲密可以让自己不那么孤独,能延长寿命呐。

UVA10815 Andy's First Dictionary

Andy, 8, has a dream - he wants to produce his very own dictionary. This is not an easy task for him, as the number of words that he knows is, well, not quite enough. Instead of thinking up all the words himself, he has a briliant idea. From his bookshelf he would pick one of his favourite story books, from which he would copy out all the distinct words. By arranging the words in alphabetical order, he is done! Of course, it is a really time-consuming job, and this is where a computer program is helpful.

You are asked to write a program that lists all the different words in the input text. In this problem, a word is defined as a consecutive sequence of alphabets, in upper and/or lower case. Words with only one letter are also to be considered. Furthermore, your program must be CaSe InSeNsItIvE. For example, words like "Apple", "apple" or "APPLE" must be considered the same.

Input

The input file is a text with no more than 5000 lines. An input line has at most 200 characters. Input is terminated by EOF.

Output

Your output should give a list of different words that appears in the input text, one in a line. The words should all be in lower case, sorted in alphabetical order. You can be sure that he number of distinct words in the text does not exceed 5000.

Sample Input

Adventures in Disneyland

Two blondes were going to Disneyland when they came to a fork in the
road. The sign read: "Disneyland Left."

So they went home.

Sample Output

a
adventures
blondes
came
disneyland
fork
going
home
in
left
read
road
sign
so
the
they
to
two
went
were
when

我的代码:
#include
#include
#include
#include
#include
using namespace std;

int main()
{
string s,b[1000010];
int i=0;

while(cin>>s) //连续读入 { for(int n = 0; n < s.size //去掉标点符号 { if(!ispunct { b[i] += s[n]; } } //大写变小写 for(int n = 0; n < b[i].size { b[i][n] = tolower; } i++; }sort; //按字母表顺序排序for(int k = 0; k < i; k++) { int flag = 0; for(int j = 0; j < k; j++) //删去重复的字符串,注意条件j < k { if(b[k] == b[j]) flag = 1; } if cout<<b[k]<<endl; }return 0;

}

Here is an example. In many cities in China, the government prohibit the middle school entrance examinations in order to relief studying burden of primary school students. Because there is no clear and strict standard of entrance, someone may make their children enter good middle schools through guanxis. Boss Liu wants to send his kid to a middle school by guanxi this year. So he find out his guanxi net. Boss Liu's guanxi net consists of N people including Boss Liu and the schoolmaster. In this net, two persons who has a guanxi between them can help each other. Because Boss Liu is a big money(In Chinese English, A "big money" means one who has a lot of money) and has little friends, his guanxi net is a naked money guanxi net -- it means that if there is a guanxi between A and B and A helps B, A must get paid. Through his guanxi net, Boss Liu may ask A to help him, then A may ask B for help, and then B may ask C for help ...... If the request finally reaches the schoolmaster, Boss Liu's kid will be accepted by the middle school. Of course, all helpers including the schoolmaster are paid by Boss Liu.

Words and phrases containing dogs (Gou in Chinese) are commonly used by young people when cracking jokes about themselves.

Nowadays, There are many people keeping pets. To those people, pets are parts of their family and have made their lives more colorful. From my perspectives, it's good to have a close relationship with pets, which can be good companions for us as well as a kind of lubricants between us and the world.

You hate Boss Liu and you want to undermine Boss Liu's plan. All you can do is to persuade ONE person in Boss Liu's guanxi net to reject any request. This person can be any one, but can't be Boss Liu or the schoolmaster. If you can't make Boss Liu fail, you want Boss Liu to spend as much money as possible. You should figure out that after you have done your best, how much at least must Boss Liu spend to get what he wants. Please note that if you do nothing, Boss Liu will definitely succeed.

年轻人经常拿含有狗的字词来自嘲。

A close relationship with pets can keep us away from loneliness. There are many pictures on wechat about lives with pets, usually dogs, including feeding them, walking with them, giving them a bath. The happy atmosphere shows us what good companions those pets have been.

Input
There are several test cases.

For example, in Mandarin, you can say "Valentine's Day has nothing to do with me since I am a single dog."

宠物不仅是我们自己的好伴,也是融洽我们与世界的联接的美好媒介。

For each test case:

例如,在普通话中,你可以说“情人节与我无关,因为我是一只‘单身汪’。”

  温暖他人~街上经常看到叔叔阿姨姑娘小伙在遛宠物狗,有一次看见漂亮姑娘牵着小狗逛,走到了路口,停在红绿灯处等绿灯。姑娘蹲下抱起了小狗,小狗毛茸茸舒服的伏在姑娘身上,小眼珠慢慢端详着周围,姑娘手指轻轻理理狗狗的毛毛,一脸温柔。突然,有个陌生人路过她向她问路,她转头,眼中那片柔意牵连着荡漾着,耐心的解答路上重复而枯燥的问题。或许,当她在办公室里,她会脚踩高跟鞋,脸化精致妆容,身披坚硬盔甲,肚里的小算盘打的精确快速,对每个人的笑容、严肃、愤怒都经过精打细算的不浪费一分毫。但是,在面对她的小狗时,她满满的柔情化成涟漪,轻轻摇曳开来,从小狗身上一直移到了陌生人。

必威,The first line contains two integers N and M. N means that there are N people in Boss Liu's guanxi net. They are numbered from 1 to N. Boss Liu is No. 1 and the schoolmaster is No. N. M means that there are M guanxis in Boss Liu's guanxi net. (3 <=N <= 30, 3 <= M <= 1000)

必威 1

Being close with pets can not only give ourselves warmth, but also break the ice between us and the outside world.

Then M lines follow. Each line contains three integers A, B and C, meaning that there is a guanxi between A and B, and if A asks B or B asks A for help, the helper will be paid C RMB by Boss Liu.

"Overtime dog" is another title frequently referred to those who work long hours.

People living in a metropolis are wary of others, filled with ideas on how to make more money than how to build pleasant relationships between us and other people. Close relationships between us and pets require thoughtfulness, love which can help us have nice attitude towards other people.For example, Once I saw a lady walking with a pet dog. They stopped at a crossing, waiting for the green light. The lady embraced the dog with softness full of her eyes. At that moment, a stranger passed by with a question about his destination. The lady smiled at him and gave him patient instructions.I'm sure it's her love towards her pet that had given contribution to her kindness towards other people, including strangers.

The input ends with N = 0 and M = 0.

“加班狗”一般是对长时间工作的人的另一种称呼。

所以,与宠物亲密相处不仅可以温暖自己,也可以温暖他人。

It's guaranteed that Boss Liu's request can reach the schoolmaster if you do not try to undermine his plan.

It is believed that words and phrases like these containing humor and self-deprecation ease the stigma attached to dog-related words.

In one word, keeping pets closely can provide warmth not only to ourselves, but also to others. It's helpful.

Output
For each test case, output the minimum money Boss Liu has to spend after you have done your best. If Boss Liu will fail to send his kid to the middle school, print "Inf" instead.

人们认为,这类幽默自嘲式的词语让与狗相关的词汇得以“洗掉污名”。

Sample Input
4 5
1 2 3
1 3 7
1 4 50
2 3 4
3 4 2
3 2
1 2 30
2 3 10
0 0

#Representation of close relationship

Sample Output
50
Inf

表示亲密关系

Adding "dog" to a friend's name can also be considered as a proof of a close relationship.

在朋友的名字后加“狗”字,也可以看作是关系亲密的证明。

必威 2

One of the most prominent examples in China is that of the actor Lin Gengxin, who is called Lin Gou - Chinese for Lin Dog - by his celebrity friends and beloved fans.

国内最有名的例子就是演员林更新,他被自己的明星友人和亲爱的粉丝称为“林狗”。

必威 3

#Easy to raise

#好养活

Children with amiable names are easy to bring up, according to an ancient Chinese proverb.

中国古代有句俗语,叫“贱名好养活”。

Parents in rural areas prefer to give nicknames including Gou Sheng and Gou Dan to their children in the hope that they are as easy to be fostered as dogs.

农村地区的父母乐于给孩子取个小名,比如“狗剩”、“狗蛋”等,希望他们像狗一样容易养大。

必威 4

#Metaphor

#隐喻

Since dogs are considered to be loyal and diligent, the word is included in more than 10 Chinese metaphors.

狗被视为忠诚、勤奋的象征,汉语中以狗喻人的词语有10多个。

For instance, "serve like a dog or a horse," is used to describe someone who is ready to render his humble services to the authorities.

例如,“犬马之劳”,是用来形容一个人摆出谦卑姿态准备受人差遣。

"Dogs don't bark to their owners" is an idiom usually adopted to represent the loyalty of ministers to their monarchs.

“狗吠非主”这个成语通常用来表示臣子对君主的忠诚。

本文由必威发布于必威,转载请注明出处:近几年汉语中的狗文化好像变了,样例过了

您可能还会对下面的文章感兴趣: