#include <iostream>
#include <map>
using namespace std;
int main()
{
multimap<char, int> mm{{'a',1},{'b',2},{'c',3},{'a',4},{'a',5},{'c',1}};
map<char, int> m(++mm.begin(), mm.lower_bound('c'));
for(auto i: m)
++i.second;
for(auto i: m)
cout << i.second << ' ';
return 0;
}
Login in to like
Login in to comment