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\n",cas++,ans);
    }
    return 0;
}
时间: 2024-11-04 12:08:07

HDU 5774 Where Amazing Happens的相关文章

hdu 5774 Where Amazing Happens(2016 Multi-University Training Contest 4——打表)

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5774 Where Amazing Happens Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 443    Accepted Submission(s): 300 Problem Description As the premier m

【模拟】HDU 5774 Where Amazing Happens

题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5774 题目大意: 已知1946~2015每一年赢得人是谁,给n个名字,问赢了多少次. 题目思路: [模拟] 打个表就好. 1 #include<stdio.h> 2 #include<string.h> 3 char list[100][35]= 4 {"Cleveland Cavaliers", 5 "Golden State Warriors&quo

hdu 5155(DP)

题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=5155 Harry And Magic Box Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 273    Accepted Submission(s): 137 Problem Description One day, Harry got

hdu 4336 Card Collector

Card Collector http://acm.hdu.edu.cn/showproblem.php?pid=4336 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Special Judge Problem Description In your childhood, do you crazy for collecting the beautiful cards in

hdu 5463 Clarke and minecraft

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5463 Clarke and minecraft Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 366    Accepted Submission(s): 193 Problem Description Clarke is a patien

HDU 4781 Assignment For Princess(YY乱搞)

http://acm.hdu.edu.cn/showproblem.php?pid=4781 Assignment For Princess Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 639    Accepted Submission(s): 196 Special Judge Problem Description Long

hdu 4908(思路题)

BestCoder Sequence Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1614    Accepted Submission(s): 566 Problem Description Mr Potato is a coder.Mr Potato is the BestCoder. One night, an amazing

HDU 4417 Super Mario(主席树求区间内的区间查询+离散化)

Super Mario Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5101    Accepted Submission(s): 2339 Problem Description Mario is world-famous plumber. His “burly” figure and amazing jumping abilit

hdu 4111 Alice and Bob 记忆化搜索 博弈论

Alice and Bob Time Limit: 20 Sec  Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=4111 Description Alice and Bob are very smart guys and they like to play all kinds of games in their spare time. The most amazing thing is that they