HDU 5774 Where Amazing Happens(多校4)
来源:互联网 发布:ipad软件下载排行榜 编辑:程序博客网 时间:2024/05/11 00:06
Where Amazing Happens
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.
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.
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
2Cleveland CavaliersOklahoma City Thunder
Sample Output
Case #1: 1Case #2: 0
题意:给定70个队伍获得总冠军的次数和信息,问给你T个队伍查询总冠军的获得数量。
#include <algorithm>#include <iostream>#include <numeric>#include <cstring>#include <iomanip>#include <string>#include <vector>#include <cstdio>#include <queue>#include <stack>#include <cmath>#include <map>#include <set>#define LL long long#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1const LL Max = (1LL<<32) - 1;const double esp = 1e-6;const double PI = 3.1415926535898;const int INF = 0x3f3f3f3f;using namespace std;char arr[][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 str[50];int main(){ int t; scanf("%d\n",t); for(int l=1;l<=t;l++){ gets(str); int ans = 0; for(int i=0;i<70;i++){ if(!strcmp(str,arr[i])){ ans += 1; } } printf("Case #%d: %d\n",l,ans); } return 0;}
0 0
- HDU 5774 Where Amazing Happens(多校4)
- HDU 5774 Where Amazing Happens(水~)
- hdu 5774 Where Amazing Happens
- HDU 5774 Where Amazing Happens
- HDU 5774 (Where Amazing Happens 简单计算)
- 【模拟】HDU 5774 Where Amazing Happens
- hdu 5774 Where Amazing Happens(2016 Multi-University Training Contest 4——打表)
- (HDU 5774)Where Amazing Happens <水题> 多校训练4
- STL签到题-HDU-5774-Where Amazing Happens
- 2016 Multi-University Training Contest 4 hdu 5774 Where Amazing Happens【map+(ctrl+c)+(ctrl+v)】
- HDOJ 5774 Where Amazing Happens(人肉搜索)
- hdu5774 Where Amazing Happens(水)
- Where Amazing Happens(打表)
- Where Amazing Happens
- 2016 Multi-University Training Contest 4 - 1011 Where Amazing Happens(水水水)
- 杭电5773之Where Amazing Happens
- 2016 Multi-University Training Contest 4 1011 Where Amazing Happens(模拟)
- 2016多校训练Contest4: 1011 Where Amazing Happens hdu5774
- 题目324 猴子吃桃问题
- 防重复提交专题3-2:总结 XSS 与 CSRF 两种跨站攻击
- 微信热修复方案的三方实践
- android在点击搜索按钮同时关闭软键盘
- 在AndroidStudio中导入Library项目
- HDU 5774 Where Amazing Happens(多校4)
- 存储阵列及其应用
- JS组件系列——表格组件神器:bootstrap table(三:终结篇,最后的干货福利)
- 2年iOS开发程序媛从紧张害怕,小心谨慎的工作到离不开这个行业
- [iOS]书写Xcode注释文档
- 在html中使用汉语
- javascripe 输出
- 十九、Hbase shell命令操作
- Android Hack Retrofit 增强参数(固定参数)