Thông tin
Số bài đã giải: 0
Performance Points: 0,00 #1280
Active contests: 1/3
Đóng góp: 0
include <bits/stdc++.h>
using namespace std;
int main() { int N; cin >> N; vector<string> a(N); for (int i = 0; i < N; i++) { cin >> a[i]; } for (int i = 0; i < N; i++) { for (int j = i + 1; j < N; j++) { if (a[j] + a[i] > a[i] + a[j]) { swap(a[i], a[j]); } } } if (a[0] == "0") { cout << 0; return 0; } for (int i = 0; i < N; i++) { cout << a[i]; } return 0; }