#include<iostream>
#include<vector>
#include <string>
#include <map>
#include <algorithm>
using namespace std;
bool cmp(const pair<string, int>& first,
const pair<string, int>& second)
{
|
|
}
int main()
{
map<string, int> mymap;
string s;
while (!cin.eof())
{
cin>>s;
if (s == "END!")
break;
mymap[s]++;
}
vector<pair <string, int> > B( mymap.begin(), mymap.end());
|
|
for (int i = 0; i < B.size(); i++)
{
cout << B[i].first << " " << B[i].second << endl;
}
return 0;
}
|