Where Amazing Happens

题意:

让你输出各个队名的出现次数。

题解:

打表题,好坑,相同的没有放在一起,需要认真找,否则容易错。

代码:

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

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

  1. hdu 5774 Where Amazing Happens 水题

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

  2. 【模拟】HDU 5774 Where Amazing Happens

    题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5774 题目大意: 已知1946~2015每一年赢得人是谁,给n个名字,问赢了多少次. 题目思路: [ ...

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

    Super Mario Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Tota ...

  4. HDU 4336:Card Collector(容斥原理)

    http://acm.split.hdu.edu.cn/showproblem.php?pid=4336 Card Collector Special Judge Problem Descriptio ...

  5. HDU 4336 Card Collector 期望dp+状压

    题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=4336 Card Collector Time Limit: 2000/1000 MS (Java/O ...

  6. hdu 5463 Clarke and minecraft

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5463 Clarke and minecraft Time Limit: 2000/1000 MS (J ...

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

    Alice and Bob Time Limit: 20 Sec  Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pi ...

  8. HDU 6060 RXD and dividing(LCA)

    [题目链接] http://acm.hdu.edu.cn/showproblem.php?pid=6060 [题目大意] 给一个n个节点的树,要求将2-n号节点分成k部分, 然后将每一部分加上节点1, ...

  9. hdu 4908(思路题)

    BestCoder Sequence Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Other ...

随机推荐

  1. Android——进度对话框

    java类代码: //普通进度对话框 public void bt8_onClick(View v) { final ProgressDialog progressDialog = new Progr ...

  2. hdu1213 并查集

    题意:有 n 个朋友,他们可能相互认识,A 认识 B,B 认识 C,则 ABC 相互认识,现在给出他们的认识情况,相互认识的人坐一桌,否则需要分开坐,问至少需要多少桌. 其实就是问并查集的个数,在初始 ...

  3. glsl计算sprite的亮度饱和度对比度

    //glsl计算sprite的亮度饱和度对比度 #ifdef GL_ES precision mediump float; #endif uniform sampler2D u_texture; va ...

  4. java中将汉字转换成16进制

    技术交流群:233513714 /** * 将汉字转换车16进制字符串 * @param str * @return st */ public static String enUnicode(Stri ...

  5. Compute Mean Value of Train and Test Dataset of Caltech-256 dataset in matlab code

    Compute Mean Value of Train and Test Dataset of Caltech-256 dataset in matlab code clc;imPath = '/ho ...

  6. ES questions

    Be Careful of Cardinality Numeric and date fields are indexed in such a way that ranges are efficien ...

  7. Lucene 对文档打分的规则整理记录

    摘引自:http://www.cnblogs.com/forfuture1978/archive/2010/02/08/1666137.html Lucene的搜索结果默认按相关度排序,这个相关度排序 ...

  8. Nginx重写规则指南 转

    http://www.ttlsa.com/nginx/nginx-rewriting-rules-guide/ Nginx重写规则指南 当运维遇到要重写情况时,往往是要程序员把重写规则写好后,发给你, ...

  9. 【转】ASP.NET数据库连接字符串总结

    来源:http://blog.csdn.net/lutinghuan/article/details/5973897 ASP.NET数据库连接字符串总结 一.使用OleDbConnection对象连接 ...

  10. 全局程序集GlobalAssemblyInfo.cs进行版本控制(引)

    原文出自:http://blog.csdn.net/oyi319/article/details/5753311 1.全局程序集GlobalAssemblyInfo.cs 我们编写的一个解决方案,通常 ...