题目:​​http://acm.hdu.edu.cn/showproblem.php?pid=1251​

作者一道题时我开始向怎么去读取那连续的两个回车,
让读入断开,最后在网上找了代码看了原来如此简单

#include<iostream>
#include<map>
#include <cstdio>
#include<cstring>
using namespace std;
map<string,int>f;
int main()
{
int i;
char a[11];
while(gets(a),strlen(a))
{
for(i=strlen(a)-1;i>=0;i--)
{
f[a]++;
a[i]='\0';
}
}
while(gets(a))
cout<<f[a]<<endl;
}