링크 : https://school.programmers.co.kr/learn/courses/30/lessons/42746
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
using namespace std;
bool cmp(string a, string b) {
return a + b > b + a;
}
string solution(vector<int> numbers) {
string answer = "";
vector<string> v;
for(int i: numbers) v.push_back(to_string(i));
sort(v.begin(), v.end(), cmp);
for(string str: v) answer+=str;
if (answer[0] == '0') return "0";
return answer;
}