zoukankan      html  css  js  c++  java
  • HDU 5774 Where Amazing Happens

    水题。比赛的时候用txt删了数字还有-,然后WA了。。。然后发现Philadelphia 76ers,这个队名中有数字......

    #pragma comment(linker, "/STACK:1024000000,1024000000")
    #include<cstdio>
    #include<cstring>
    #include<cmath>
    #include<algorithm>
    #include<vector>
    #include<map>
    #include<set>
    #include<queue>
    #include<stack>
    #include<iostream>
    using namespace std;
    typedef long long LL;
    const double pi=acos(-1.0),eps=1e-8;
    void File()
    {
        freopen("D:\in.txt","r",stdin);
        freopen("D:\out.txt","w",stdout);
    }
    inline int read()
    {
        char c = getchar();
        while(!isdigit(c)) c = getchar();
        int x = 0;
        while(isdigit(c))
        {
            x = x * 10 + c - '0';
            c = getchar();
        }
        return x;
    }
    
    
    char s[100][50]=
    {
        "Cleveland Cavaliers",
        "Golden State Warriors",
        "San Antonio Spurs",
        "Miami Heat",
        "Miami Heat",
        "Dallas Mavericks",
        "L.A. Lakers",
        "L.A. Lakers",
        "Boston Celtics",
        "San Antonio Spurs",
        "Miami Heat",
        "San Antonio Spurs",
        "Detroit Pistons",
        "San Antonio Spurs",
        "L.A. Lakers",
        "L.A. Lakers",
        "L.A. Lakers",
        "San Antonio Spurs",
        "Chicago Bulls",
        "Chicago Bulls",
        "Chicago Bulls",
        "Houston Rockets",
        "Houston Rockets",
        "Chicago Bulls",
        "Chicago Bulls",
        "Chicago Bulls",
        "Detroit Pistons",
        "Detroit Pistons",
        "L.A. Lakers",
        "L.A. Lakers",
        "Boston Celtics",
        "L.A. Lakers",
        "Boston Celtics",
        "Philadelphia 76ers",
        "L.A. Lakers",
        "Boston Celtics",
        "L.A. Lakers",
        "Seattle Sonics",
        "Washington Bullets",
        "Portland Trail Blazers",
        "Boston Celtics",
        "Golden State Warriors",
        "Boston Celtics",
        "New York Knicks",
        "L.A. Lakers",
        "Milwaukee Bucks",
        "New York Knicks",
        "Boston Celtics",
        "Boston Celtics",
        "Philadelphia 76ers",
        "Boston Celtics",
        "Boston Celtics",
        "Boston Celtics",
        "Boston Celtics",
        "Boston Celtics",
        "Boston Celtics",
        "Boston Celtics",
        "Boston Celtics",
        "St. Louis Hawks",
        "Boston Celtics",
        "Philadelphia Warriors",
        "Syracuse Nats",
        "Minneapolis Lakers",
        "Minneapolis Lakers",
        "Minneapolis Lakers",
        "Rochester Royals",
        "Minneapolis Lakers",
        "Minneapolis Lakers",
        "Baltimore Bullets",
        "Philadelphia Warriors",
    };
    
    char u[1000];
    int T;
    
    int main()
    {
        scanf("%d",&T);int cas=1;getchar();
        while(T--)
        {
            gets(u); int ans=0;
            for(int i=0; i<70; i++) if(strcmp(u,s[i])==0) ans++;
            printf("Case #%d: %d
    ",cas++,ans);
        }
        return 0;
    }
  • 相关阅读:
    eclipse中将web项目部署到tomcat
    mysql + Fluently NHibernate + WebAPI + Autofac
    无状态
    mysql备份及还原
    【jmeter】jmeter 常用组件 介绍
    【测试小方法】通过谷歌开发者工具手动修改位置信息
    【jmeter】jmeter 设置线程组 各个字段的概念
    【jmeter】jmete 安装介绍
    【腾讯位置服务web service】腾讯位置服务web service api
    【python】python 的 lambda 函数
  • 原文地址:https://www.cnblogs.com/zufezzt/p/5723410.html
Copyright © 2011-2022 走看看