int n,a,b,c;
cin >> n;
map<int,vector<pair<int,int>>> mv;
for(int i=0;i<n;++i)
{
cin>>a>>b>>c;
mv[a].insert(make_pair(b,c));
}
I m trying to take input from std::vector of std::pair which is in a std::map.Is it possible?
And, how can I iterate through the map?
inserttakes an iterator to indicate where to insert the new element. Perhaps you meantpush_back?