Where Amazing Happens

题目连接:

http://acm.hdu.edu.cn/showproblem.php?pid=5774

Description

As the premier men's professional basketball league in the world, the National Basketball Association (NBA) has witnessed many superstars, legendary teams and precious friendships.

Here is a list of every season’s champion from the league's inception in 1946 to 2015.

Season Champion

2015-16 Cleveland Cavaliers

2014-15 Golden State Warriors

2013-14 San Antonio Spurs

2012-13 Miami Heat

2011-12 Miami Heat

2010-11 Dallas Mavericks

2009-10 L.A. Lakers

2008-09 L.A. Lakers

2007-08 Boston Celtics

2006-07 San Antonio Spurs

2005-06 Miami Heat

2004-05 San Antonio Spurs

2003-04 Detroit Pistons

2002-03 San Antonio Spurs

2001-02 L.A. Lakers

2000-01 L.A. Lakers

1999-00 L.A. Lakers

1998-99 San Antonio Spurs

1997-98 Chicago Bulls

1996-97 Chicago Bulls

1995-96 Chicago Bulls

1994-95 Houston Rockets

1993-94 Houston Rockets

1992-93 Chicago Bulls

1991-92 Chicago Bulls

1990-91 Chicago Bulls

1989-90 Detroit Pistons

1988-89 Detroit Pistons

1987-88 L.A. Lakers

1986-87 L.A. Lakers

1985-86 Boston Celtics

1984-85 L.A. Lakers

1983-84 Boston Celtics

1982-83 Philadelphia 76ers

1981-82 L.A. Lakers

1980-81 Boston Celtics

1979-80 L.A. Lakers

1978-79 Seattle Sonics

1977-78 Washington Bullets

1976-77 Portland Trail Blazers

1975-76 Boston Celtics

1974-75 Golden State Warriors

1973-74 Boston Celtics

1972-73 New York Knicks

1971-72 L.A. Lakers

1970-71 Milwaukee Bucks

1969-70 New York Knicks

1968-69 Boston Celtics

1967-68 Boston Celtics

1966-67 Philadelphia 76ers

1965-66 Boston Celtics

1964-65 Boston Celtics

1963-64 Boston Celtics

1962-63 Boston Celtics

1961-62 Boston Celtics

1960-61 Boston Celtics

1959-60 Boston Celtics

1958-59 Boston Celtics

1957-58 St. Louis Hawks

1956-57 Boston Celtics

1955-56 Philadelphia Warriors

1954-55 Syracuse Nats

1953-54 Minneapolis Lakers

1952-53 Minneapolis Lakers

1951-52 Minneapolis Lakers

1950-51 Rochester Royals

1949-50 Minneapolis Lakers

1948-49 Minneapolis Lakers

1947-48 Baltimore Bullets

1946-47 Philadelphia Warriors

(quoted from http://www.nba.com/history/nba-season-recaps/)

Given the team name, it won’t be difficult for you to count how many times this team(with exactly the same name) has made amazing happen.

Input

The first line gives the number of test cases. Each case contains one string S representing the team to be queried.

T<=30.S consists of English letters, digits, punctuations and spaces. And 1<=length(S)<=30.

Output

For each test case, output one line containing "Case #x: y", where x is the test case number (starting from 1) and y is the times this team has won the championship according to the list above.

Sample Input

2

Cleveland Cavaliers

Oklahoma City Thunder

Sample Output

Case #1: 1

Case #2: 0

Hint

题意

给你个队名,问你这个队拿了多少次NBA总冠军

题解:

复制下来,然后输出一下就好了。。。

代码

#include <bits/stdc++.h>
#define rep(a,b,c) for(int (a)=(b);(a)<=(c);++(a))
#define drep(a,b,c) for(int (a)=(b);(a)>=(c);--(a))
#define pb push_back
#define mp make_pair
#define sf scanf
#define pf printf
#define two(x) (1<<(x))
#define clr(x,y) memset((x),(y),sizeof((x)))
#define dbg(x) cout << #x << "=" << x << endl;
const int mod = 1e9 + 7;
int mul(int x,int y){return 1LL*x*y%mod;}
int qpow(int x , int y){int res=1;while(y){if(y&1) res=mul(res,x) ; y>>=1 ; x=mul(x,x);} return res;}
inline int read(){int x=0,f=1;char ch=getchar();while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}return x*f;}
using namespace std;
const int maxn = 1e5 + 15; string str[] = {"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",
}; int main(int argc,char *argv[]){
int T,cas=0;
sf("%d",&T);getchar();
while(T--){
string s;
getline( cin , s );
int ans = 0;
rep(i,0,69) if( s == str[i] ) ++ ans;
pf("Case #%d: %d\n",++cas,ans);
}
return 0;
}

hdu 5774 Where Amazing Happens 水题的更多相关文章

  1. HDU 5578 Friendship of Frog 水题

    Friendship of Frog Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.ph ...

  2. HDU 5590 ZYB's Biology 水题

    ZYB's Biology Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid ...

  3. HDU 5538 L - House Building 水题

    L - House Building Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.ph ...

  4. hdu 1005:Number Sequence(水题)

    Number Sequence Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)T ...

  5. hdu 1018:Big Number(水题)

    Big Number Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total ...

  6. hdu 2041:超级楼梯(水题,递归)

    超级楼梯 Time Limit: / MS (Java/Others) Memory Limit: / K (Java/Others) Total Submission(s): Accepted Su ...

  7. HDOJ/HDU 1328 IBM Minus One(水题一个,试试手)

    Problem Description You may have heard of the book '2001 - A Space Odyssey' by Arthur C. Clarke, or ...

  8. HDOJ(HDU) 2090 算菜价(简单水题、)

    Problem Description 妈妈每天都要出去买菜,但是回来后,兜里的钱也懒得数一数,到底花了多少钱真是一笔糊涂帐.现在好了,作为好儿子(女儿)的你可以给她用程序算一下了,呵呵. Input ...

  9. HDOJ(HDU) 1555 How many days?(水题)

    Problem Description 8600的手机每天消费1元,每消费K元就可以获赠1元,一开始8600有M元,问最多可以用多少天? Input 输入包括多个测试实例.每个测试实例包括2个整数M, ...

随机推荐

  1. 你真的理解js的赋值语句么

    之前谢亮兄和我一起讨论的一个问题: var a = {}; a.x = a = 3; a 的值是什么. 其实当执行赋值语句的时候,js 的 = 左侧不是原始变量地址,而是一个新值.怎么理解这句话呢? ...

  2. html5 canvas loading(这可怕的编辑器,自动把我的canvas转义了)---以前收藏的整理了一下

    /* super inefficient right now, could be improved */ var c = document.getElementById('canvasload'), ...

  3. AngularJs -- ngMessages(1.3+)

    ngMessages(1.3+) 表单和验证是AngularJS中复杂的组件之一.用AngularJS默认的方式来写,不是特别好,不简洁. 在AngualrJS1.3发布前,表单验证必须以这种方式编写 ...

  4. <dl>

    定义列表 自定义列表不仅仅是一列项目,而是项目及其注释的组合. 自定义列表以 <dl> 标签开始.每个自定义列表项以 <dt> 开始.每个自定义列表项的定义以 <dd&g ...

  5. (叉积)B - Toy Storage POJ - 2398

    题目链接:https://cn.vjudge.net/contest/276358#problem/B 题目大意:和上一次写叉积的题目一样,就只是线不是按照顺序给的,是乱序的,然后输出的时候是按照有三 ...

  6. Linux下select&poll&epoll的实现原理(一)【转】

    转自:http://www.cnblogs.com/lanyuliuyun/p/5011526.html 最近简单看了一把 linux-3.10.25 kernel中select/poll/epoll ...

  7. linux 环境变量设置方法总结(PATH / LD_LIBRARY_PATH)

    PATH和LD_LIBRARY_PATH本质都是变量,所谓变量的意思就是由别人赋值产生的,直觉往往会让我们添加和减少这个变量本身的某些路径,实际上这是不正确的.正确的做法是我们要去修改赋予这个变量数值 ...

  8. LeetCode(17):电话号码的字母组合

    Medium! 题目描述: 给定一个仅包含数字 2-9 的字符串,返回所有它能表示的字母组合. 给出数字到字母的映射如下(与电话按键相同).注意 1 不对应任何字母. 示例: 输入:"23& ...

  9. CF1064B 【Equations of Mathematical Magic】

    题目要求解$a-(a\oplus x)-x=0$的解$x$的个数 移项得$a-x=a\oplus x$ $a$的二进制形式,应该是一个$01$串,异或的过程是不能影响到两个不同的位的,所以我们按位考虑 ...

  10. 2018-2019-2 《网络对抗技术》Exp0 Kali安装 Week1 20165301

    2018-2019-2 <网络对抗技术>Exp0 Kali安装 Week1 20165301 安装kali 参考此网站 设置共享文件夹 虚拟机->设置->选项->共享文件 ...