AC代码:
#include <iostream>
#include <map>
#include <cstring>
#include <cstdlib>
#include <cstdio>
using namespace std;
int main()
{
map<string,int> mm;
mm.insert(pair<string,int>("Cleveland Cavaliers",1));
mm.insert(pair<string,int>("Golden State Warriors",2));
mm.insert(pair<string,int>("San Antonio Spurs",5));
mm.insert(pair<string,int>("Miami Heat",3));
mm.insert(pair<string,int>("Dallas Mavericks",1));
mm.insert(pair<string,int>("L.A. Lakers",11));
mm.insert(pair<string,int>("Boston Celtics",17));
mm.insert(pair<string,int>("Detroit Pistons",3));
mm.insert(pair<string,int>("Chicago Bulls",6));
mm.insert(pair<string,int>("Houston Rockets",2));
mm.insert(pair<string,int>("Philadelphia 76ers",2));
mm.insert(pair<string,int>("Seattle Sonics",1));
mm.insert(pair<string,int>("Washington Bullets",1));
mm.insert(pair<string,int>("Portland Trail Blazers",1));
mm.insert(pair<string,int>("New York Knicks",2));
mm.insert(pair<string,int>("St. Louis Hawks",1));
mm.insert(pair<string,int>("Philadelphia Warriors",2));
mm.insert(pair<string,int>("Syracuse Nats",1));
mm.insert(pair<string,int>("Minneapolis Lakers",5));
mm.insert(pair<string,int>("Rochester Royals",1));
mm.insert(pair<string,int>("Baltimore Bullets",1));
mm.insert(pair<string,int>("Milwaukee Bucks",1));
int n;
char s[100];
cin>>n;
for(int i=1;i<=n;i++)
{
if(i==1)
getchar();
gets(s);
// cout<<s<<endl;
cout<<"Case #"<<i<<": "<<mm[s]<<endl;
}
return 0;
}