Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 0    Accepted Submission(s): 0

Problem 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

题意:

给定这些年以来得过总冠军的队伍名称,求给你的队伍共取得了多少次冠军。

map水一发啊,注意输入的格式。

附AC代码:

 #include<iostream>
#include<cstring>
#include<cmath>
#include<map>
using namespace std; int main(){
int n;
cin>>n;
map<string,int> m;
m["Cleveland Cavaliers"]+=;
m["Golden State Warriors"]+=;
m["San Antonio Spurs"]+=;
m["Miami Heat"]+=;
m["Miami Heat"]+=;
m["Dallas Mavericks"]+=;
m["L.A. Lakers"]+=;
m["L.A. Lakers"]+=;
m["Boston Celtics"]+=;
m["San Antonio Spurs"]+=;
m["Miami Heat"]+=;
m["San Antonio Spurs"]+=;
m["Detroit Pistons"]+=;
m["San Antonio Spurs"]+=;
m["L.A. Lakers"]+=;
m["L.A. Lakers"]+=;
m["L.A. Lakers"]+=;
m["San Antonio Spurs"]+=;
m["Chicago Bulls"]+=;
m["Chicago Bulls"]+=;
m["Chicago Bulls"]+=;
m["Houston Rockets"]+=;
m["Houston Rockets"]+=;
m["Chicago Bulls"]+=;
m["Chicago Bulls"]+=;
m["Chicago Bulls"]+=;
m["Detroit Pistons"]+=;
m["L.A. Lakers"]+=;
m["L.A. Lakers"]+=;
m["Boston Celtics"]+=;
m["L.A. Lakers"]+=;
m["Boston Celtics"]+=;
m["Philadelphia 76ers"]+=;
m["L.A. Lakers"]+=;
m["Boston Celtics"]+=;
m["L.A. Lakers"]+=;
m["Seattle Sonics"]+=;
m["Washington Bullets"]+=;
m["Portland Trail Blazers"]+=;
m["Boston Celtics"]+=;
m["Golden State Warriors"]+=;
m["Boston Celtics"]+=;
m["New York Knicks"]+=;
m["L.A. Lakers"]+=;
m["Milwaukee Bucks"]+=;
m["New York Knicks"]+=;
m["Boston Celtics"]+=;
m["Boston Celtics"]+=;
m["Philadelphia 76ers"]+=;
m["Boston Celtics"]+=;
m["St. Louis Hawks"]+=;
m["Boston Celtics"]+=;
m["Philadelphia Warriors"]+=;
m["Syracuse Nats"]+=;
m["Minneapolis Lakers"]+=;
m["Rochester Royals"]+=;
m["Minneapolis Lakers"]+=;
m["Minneapolis Lakers"]+=;
m["Baltimore Bullets"]+=;
m["Philadelphia Warriors"]+=; int k=;
getchar();//!
for(int i=;i<n;i++){char s[];
gets(s);//!读入空格
cout<<"Case #"<<k++<<": ";
cout<<m[s]<<endl;
}
return ;
}

string测了一发也可以:

 #include<iostream>
#include<cstring>
#include<cmath>
#include<map>
using namespace std; int main(){
int n;
cin>>n;
map<string,int> m;
m["Cleveland Cavaliers"]+=;
m["Golden State Warriors"]+=;
m["San Antonio Spurs"]+=;
m["Miami Heat"]+=;
m["Miami Heat"]+=;
m["Dallas Mavericks"]+=;
m["L.A. Lakers"]+=;
m["L.A. Lakers"]+=;
m["Boston Celtics"]+=;
m["San Antonio Spurs"]+=;
m["Miami Heat"]+=;
m["San Antonio Spurs"]+=;
m["Detroit Pistons"]+=;
m["San Antonio Spurs"]+=;
m["L.A. Lakers"]+=;
m["L.A. Lakers"]+=;
m["L.A. Lakers"]+=;
m["San Antonio Spurs"]+=;
m["Chicago Bulls"]+=;
m["Chicago Bulls"]+=;
m["Chicago Bulls"]+=;
m["Houston Rockets"]+=;
m["Houston Rockets"]+=;
m["Chicago Bulls"]+=;
m["Chicago Bulls"]+=;
m["Chicago Bulls"]+=;
m["Detroit Pistons"]+=;
m["L.A. Lakers"]+=;
m["L.A. Lakers"]+=;
m["Boston Celtics"]+=;
m["L.A. Lakers"]+=;
m["Boston Celtics"]+=;
m["Philadelphia 76ers"]+=;
m["L.A. Lakers"]+=;
m["Boston Celtics"]+=;
m["L.A. Lakers"]+=;
m["Seattle Sonics"]+=;
m["Washington Bullets"]+=;
m["Portland Trail Blazers"]+=;
m["Boston Celtics"]+=;
m["Golden State Warriors"]+=;
m["Boston Celtics"]+=;
m["New York Knicks"]+=;
m["L.A. Lakers"]+=;
m["Milwaukee Bucks"]+=;
m["New York Knicks"]+=;
m["Boston Celtics"]+=;
m["Boston Celtics"]+=;
m["Philadelphia 76ers"]+=;
m["Boston Celtics"]+=;
m["St. Louis Hawks"]+=;
m["Boston Celtics"]+=;
m["Philadelphia Warriors"]+=;
m["Syracuse Nats"]+=;
m["Minneapolis Lakers"]+=;
m["Rochester Royals"]+=;
m["Minneapolis Lakers"]+=;
m["Minneapolis Lakers"]+=;
m["Baltimore Bullets"]+=;
m["Philadelphia Warriors"]+=; int k=;
getchar();
for(int i=;i<n;i++){string s;
getline(cin,s);
cout<<"Case #"<<k++<<": ";
cout<<m[s]<<endl;
}
return ;
}

Where Amazing Happens的更多相关文章

  1. RxJS + Redux + React = Amazing!(译一)

    今天,我将Youtube上的<RxJS + Redux + React = Amazing!>翻译(+机译)了下来,以供国内的同学学习,英文听力好的同学可以直接看原版视频: https:/ ...

  2. RxJS + Redux + React = Amazing!(译二)

    今天,我将Youtube上的<RxJS + Redux + React = Amazing!>的后半部分翻译(+机译)了下来,以供国内的同学学习,英文听力好的同学可以直接看原版视频: ht ...

  3. The Amazing ProgressBar Control(转)

    好久没写博客了,今天就先转一篇,随后可以再写些~~~ 直接把原文粘过来,就不再进行翻译和个人说明了,因为效果很COOL~ The Amazing ProgressBar Control A progr ...

  4. 【jquery】一款不错的音频播放器——Amazing Audio Player

    前段时间分享了一款视频播放器,点击这里.今天介绍一款不错的音频播放器——Amazing Audio Player. 介绍: Amazing Audio Player 是一个使用很方便的 Windows ...

  5. hdu 5774 Where Amazing Happens

    Where Amazing Happens 题意: 让你输出各个队名的出现次数. 题解: 打表题,好坑,相同的没有放在一起,需要认真找,否则容易错. 代码: #include<iostream& ...

  6. Lesson 3: The Amazing New Mobile Web

    Lesson 3: The Amazing New Mobile Web Article 1: This is Responsive by Brad Frost 各种响应式网站设计的资源. Artic ...

  7. hdu 5774 Where Amazing Happens 水题

    Where Amazing Happens 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5774 Description As the premie ...

  8. English trip V1 - 5.That's Amazing! 棒极了! Teacher:Patrick Key: can or can't

    In this lesson you will learn to describe what people can do. 在本课中,您将学习如何描述人们可以做什么. STARTE drive a c ...

  9. [翻译] The Amazing Audio Engine

    The Amazing Audio Engine https://github.com/TheAmazingAudioEngine/TheAmazingAudioEngine The Amazing ...

  10. 13 Amazing Component Sets Driving Success In Delphi Berlin On Android And IOS

    There are quite a few Firemonkey component sets available for Delphi Berlin which can get you ahead ...

随机推荐

  1. jquery+css实现邮箱自动补全

    今天在公司做一个电子商务网站的注册会员时,要求用户在电子邮箱文本框中输入时,给与热点提示常用的电子邮箱,帮助用户选择,提高体验效果.下面是用Jquery+css实现的邮箱自动补全,供大家参考和学习. ...

  2. 【spring boot】mybatis启动报错:Consider defining a bean of type 'com.newhope.interview.dao.UserMapper' in your configuration. 【Mapper类不能被找到】@Mapper 和@MapperScan注解的区别

    启动报错: 2018-05-16 17:22:58.161 ERROR 4080 --- Disconnected from the target VM, address: '127.0.0.1:50 ...

  3. python 工具 FFT变换

    import numpy as npimport pylabwave_data =np.fromfile("C:\\Users\\Administrator\\Desktop\\bins\\ ...

  4. mahout in Action2.2-聚类介绍-K-means聚类算法

    聚类介绍 本章包含 1 实战操作了解聚类 2.了解相似性概念 3 使用mahout执行一个简单的聚类实例 4.用于聚类的各种不同的距离測算方法 作为人类,我们倾向于与志同道合的人合作-"鸟的 ...

  5. zoj 3573 Under Attack(线段树 标记法 最大覆盖数)

    Under Attack Time Limit:  10 Seconds      Memory Limit:  65536 KB  Doctor serves at a military air f ...

  6. 怎样使用ListView?

    怎样使用ListView? watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFC ...

  7. opencv2反投影直方图以检測特定的图像内容

    #ifndef HISTOGRAM_H_ #define HISTOGRAM_H_ #include<opencv2/core/core.hpp> #include<opencv2/ ...

  8. 李洪强iOS开发之-实现点击单行View显示和隐藏Cell

    李洪强iOS开发之-实现点击单行View显示和隐藏Cell 实现的效果:  .... ....

  9. Creo二次开发--内存清理函数

    我们在处理模型文件时,总会遇到内存环境的清除问题.一个干净的Creo工作环境.是保证工作能顺利完毕的保障. ProMdlEraseNotDisplayed()函数提供了清除未显示模型的功能. 当须要循 ...

  10. JS中使用组合构造函数模式和原型模式

    创建自定义类型的最常见方式,就是组合使用构造函数模式与原型模式.构造函数模式用于定义实例属性,而原型模式用于定义方法和共享的属性. 结果,每个实例都会有自己的一份实例属性的副本,但同时又共享着对方法的 ...