5084 Stool Superman1

5084 Stool Superman

 

 时间限制: 1 s
 空间限制: 1000 KB
 题目等级 : 未定级
 
 
 
题目描述 Description

这个题目很简单,只要你输出"Would you like to be a God"然后如果回答是Stool Superman is squating down in toilet eating feces那么再输出yes不然no

 

输入描述 Input Description

输出描述 Output Description

样例输入 Sample Input

Stool Superman is squating down in toilet eating feces

 

样例输出 Sample Output

Would you like to be a God

yes

数据范围及提示 Data Size & Hint

 1 #include<iostream>
 2 #include<cstdio>
 3 #include<string>
 4 #include<cstring>
 5 #include<cmath>
 6 #include<algorithm>
 7 using namespace std;
 8 string a[7000];
 9 int main()
10 {
11     int n=0;
12     while(cin>>a[++n]);
13     n--;
14     sort(a+1,a+n+1);
15     int t=a[1].length();
16     for(int i=2;i<=n;i++)
17     {
18           int j=0;
19           while(a[i][j]==a[i-1][j]&&j<a[i-1].length())j++;
20           t+=a[i].length()-j;
21     }
22       cout<<t+1;
23 }

 

posted @ 2017-03-29 16:55  ioioioioioio  阅读(145)  评论(0编辑  收藏  举报