You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
437 B

#include <bits/stdc++.h>
using namespace std;
string a[21] = {};
int main() {
//输入+输出重定向
freopen("../1269.txt", "r", stdin);
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> a[i];
}
//排序
sort(a + 1, a + n + 1, greater<string>());
for (int i = 1; i <= n; ++i) {
cout << a[i];
}
//关闭文件
fclose(stdin);
return 0;
}