I get The idea of Problem D Today But I was getting WA and I did not know where is the wrong.. After the contest I discovered that my map donot do sorting to vector of string in it ...
why ???
map<char, vector<string>>mp;
for(auto i:mp){
sort(i.second.begin(), i.second.end());
}