hdu 5774 Where Amazing Happens
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的更多相关文章
- hdu 5774 Where Amazing Happens 水题
Where Amazing Happens 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5774 Description As the premie ...
- 【模拟】HDU 5774 Where Amazing Happens
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5774 题目大意: 已知1946~2015每一年赢得人是谁,给n个名字,问赢了多少次. 题目思路: [ ...
- HDU 4417 Super Mario(主席树求区间内的区间查询+离散化)
Super Mario Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Tota ...
- HDU 4336:Card Collector(容斥原理)
http://acm.split.hdu.edu.cn/showproblem.php?pid=4336 Card Collector Special Judge Problem Descriptio ...
- HDU 4336 Card Collector 期望dp+状压
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=4336 Card Collector Time Limit: 2000/1000 MS (Java/O ...
- hdu 5463 Clarke and minecraft
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5463 Clarke and minecraft Time Limit: 2000/1000 MS (J ...
- hdu 4111 Alice and Bob 记忆化搜索 博弈论
Alice and Bob Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pi ...
- HDU 6060 RXD and dividing(LCA)
[题目链接] http://acm.hdu.edu.cn/showproblem.php?pid=6060 [题目大意] 给一个n个节点的树,要求将2-n号节点分成k部分, 然后将每一部分加上节点1, ...
- hdu 4908(思路题)
BestCoder Sequence Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Other ...
随机推荐
- Ubuntu 12.04 禁用触摸板
昨天把系统换为Backbox了,版本为Ubuntu12.04,装完后发现其触摸板不能禁用,之前在其他版本都是直接快捷键就可关闭或者启用触摸板,解决方法如下: sudo add-apt-reposito ...
- C++中this指针的用法详解(转)
原文地址:http://blog.chinaunix.net/uid-21411227-id-1826942.html 1. this指针的用处: 一个对象的this指针并不是对象本身的一部分,不会影 ...
- html-javascript前端页面刷新重载的方法汇总
记得我在兴安得力实习要转正的时候,我领导象征性的给我出了一套测试题目,里面就有js闭包和页面刷新等题目.今天把很久之前的测试题目之一,js页面刷新的方法以及页面自动刷新跳转和返回上一页和下一页等方法总 ...
- 硬链接与软连接[转自vbird]
前言 在 Linux 底下的连结档有两种,一种是类似 Windows 的快捷方式功能的文件,可以让你快速的链接到目标文件(或目录),这种是软链接: 另一种则是透过文件系统的 inode 连结来产生新档 ...
- Linux下tmpfs介绍及使用
tmpfs介绍 tmpfs是一种虚拟内存文件系统,而不是块设备.是基于内存的文件系统,创建时不需要使用mkfs等初始化它最大的特点就是它的存储空间在VM(virtual memory),VM是由lin ...
- C#配置升级
void ConvertProject() { List<BaseProjectConverter> convertors = new List<BaseProjectConvert ...
- 对象属性操作-包含kvc---ios
#import <Foundation/Foundation.h> @class Author; @interface Books : NSObject{ @private NSStrin ...
- mybatis 批量插入和where条件使用
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-/ ...
- Eclipse+Maven创建webapp项目<一><二><三>
转-http://www.cnblogs.com/candle806/p/3439469.html Eclipse+Maven创建webapp项目<一> 1.开启eclipse,右键new ...
- Axure RP里单选按钮组
选中要编组的单选项,然后照下图所示给这一组单选编一个名字.