#include <string>
#include <vector>
#include <map>
#include <algorithm>
using namespace std;
vector<int> solution(string s) {
    vector<int> answer;
    map<int,int> m;    
    stringstream ss(s);
    int num;
    string str="";
    for(int i=0;i<s.length();i++)
    {
        
        if((s[i] >= '0' && s[i] <= '9') && (s[i+1] >= '0' && s[i+1] <= '9')){
            str+=s[i];
        }else if(s[i] >= '0' && s[i] <= '9'){
        
          str+=s[i];
          m[stoi(str)]++;  
          str="";
        } 
    }
    
    vector<pair<int,int>> tmp(m.begin(), m.end());
    sort(tmp.begin(), tmp.end(), compare);
    
    for(auto a : tmp) answer.push_back(a.first);
    return answer;
}
- map에서 특정 value에 따라 sort하려면 vector에 옮긴 뒤 시행해야 한다!