题目来源:拼数
#include<iostream>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<algorithm>
#include<cmath>
using namespace std;
bool cmp(string a,string b) //利用字典序两两比较
{
return a+b>b+a;
}
int main()
{;
int n;
cin >> n;
string a[25];
for(int i = 0;i<n;i++) cin >> a[i];
sort(a,a+n,cmp);
for(int i = 0;i<n;i++) cout << a[i];
return 0;
}