标签:
banana band bee absolute acm ba b band abc
2 3 1 0
#include<iostream>
#include<stdio.h>
#include<string>
#include<string.h>
#include<map>
using namespace std;
map<string,int> u;
int main(){
char s1[20],s2[20],s3[20];
while(gets(s1)){
int len=strlen(s1);
if(len==0) break;
for(int i=0;i<len;++i){
s2[i]=s1[i];
s2[i+1]='\0';
u[s2]++;
}
}
while(gets(s3)){
// printf("##%s\n",s3);
printf("%d\n",u[s3]);
//printf("null\n");
}
return 0;
}版权声明:本文为博主原创文章,未经博主允许不得转载。
标签:
原文地址:http://blog.csdn.net/qq_18062811/article/details/47088945