---
# System prepended metadata

title: '(YKL43(UVA10420)) List of Conquests :'
tags: [CPP(CPE)]

---

#  (YKL43(UVA10420)) List of Conquests :  

YKL43_UVA10420_List_of_Conquests.cpp


![image](https://hackmd.io/_uploads/Hkp5SDV6A.png)

```cpp!
#include <iostream>
#include <map>
#include <string>
#include <sstream> 

using namespace std;

int main()
{
    int n;
    cin >> n;
    cin.ignore();
    map<string, int> countryCount;

    for (int i = 0; i < n; i++)
    {
        string line, country;

        getline(cin, line);

        stringstream ss(line);

        ss >> country;

        countryCount[country]++;
    }
    
    for(const auto &temp : countryCount){
        cout<<temp.first<<" " << temp.second<<endl;
    }
}
```