标签:out author output gets using 注意 sub while otto
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; }
标签:out author output gets using 注意 sub while otto
原文地址:http://www.cnblogs.com/yxysuanfa/p/6746813.html