zoukankan      html  css  js  c++  java
  • 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 }
  • 相关阅读:
    游标+递归 查询 客户 子客户 查询财务信用
    导入EXCEL
    ftp读取txt数据并插入数据库
    查询通话时间报表
    4.10上午
    4.7下午
    4.6下午
    4.6上午
    4.5上午
    4.1下午
  • 原文地址:https://www.cnblogs.com/lyqlyq/p/6640602.html
Copyright © 2011-2022 走看看