| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Re:一次AC了,庆祝一下!In Reply To:一次AC了,庆祝一下! Posted by:bjtu1 at 2008-08-15 21:39:32 > 相信我:
> #include<iostream>
> #include<string>
> #include<map>
> using namespace std;
>
> int main()
> {
> char str[100];
> string in;
> map<string,int>level;
> int n,i,m;
>
> while(scanf("%d",&n)!=EOF){
> level.clear();
> for(i=1;i<=n;i++){
> scanf("%s",str);
> in=str;
> level[in]++;
> }
> scanf("%d",&m);
> for(i=1;i<=m;i++){
> scanf("%s",str);
> in=str;
> printf("%d\n",level[in]);
> }
> }
> return 0;
> }
真牛逼
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator