5084 Stool Superman1
题目描述 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 }