#include<iostream>
#include<map>
#include<string>
#include<utility>
using namespace std;
int main()
{
typedef map<string,int>mapType;
mapType populationMap;
populationMap.insert(pair<string,int>("Maharashtra",7026357));
populationMap.insert(pair<string,int>("Rajasthan",6578936));
populationMap.insert(pair<string,int>("Karnataka",6678993));
populationMap.insert(pair<string,int>("Punjab",5789032));
populationMap.insert(pair<string,int>("West Bengal",6676291));
mapType::iterator iter;
cout<<"====Population of states in India====";
cout<<"\nSize of populationMap:"<<populationMap.size()<<"\n";
string state_name;
cout<<"\n Enter name of the state";
cin>>state_name;
iter=populationMap.find(state_name);
if(iter!=populationMap.end())
cout<<state_name<<"s population is"<<iter->second;
else
cout<<"Key is not in populationMap\n";
populationMap.clear();
}
I2luY2x1ZGU8aW9zdHJlYW0+ICAKI2luY2x1ZGU8bWFwPiAgCiNpbmNsdWRlPHN0cmluZz4gCiNpbmNsdWRlPHV0aWxpdHk+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7IAppbnQgbWFpbigpICAKeyAgCiAgCXR5cGVkZWYgbWFwPHN0cmluZyxpbnQ+bWFwVHlwZTsgIAogbWFwVHlwZSBwb3B1bGF0aW9uTWFwOyAgCiAgCiBwb3B1bGF0aW9uTWFwLmluc2VydChwYWlyPHN0cmluZyxpbnQ+KCJNYWhhcmFzaHRyYSIsNzAyNjM1NykpOyAgCiBwb3B1bGF0aW9uTWFwLmluc2VydChwYWlyPHN0cmluZyxpbnQ+KCJSYWphc3RoYW4iLDY1Nzg5MzYpKTsKIHBvcHVsYXRpb25NYXAuaW5zZXJ0KHBhaXI8c3RyaW5nLGludD4oIkthcm5hdGFrYSIsNjY3ODk5MykpOwogcG9wdWxhdGlvbk1hcC5pbnNlcnQocGFpcjxzdHJpbmcsaW50PigiUHVuamFiIiw1Nzg5MDMyKSk7CiBwb3B1bGF0aW9uTWFwLmluc2VydChwYWlyPHN0cmluZyxpbnQ+KCJXZXN0IEJlbmdhbCIsNjY3NjI5MSkpOwogbWFwVHlwZTo6aXRlcmF0b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