75求调
查看原帖
75求调
1381435
uwuuk楼主2024/7/25 09:40
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cstring>
using namespace std;
struct chuan {
    string str0;
};
int cmp(chuan x, chuan y) {
    return x.str0 > y.str0;
}
int main()
{
    int n;
    int result;
    string str00;
    vector<chuan> str;
    struct chuan temp;
    cin >> n;
    for (int i = 0; i < n; i++) {
        cin>>temp.str0;
        str.push_back(temp);
    }
    sort(str.begin(), str.end(), cmp);
    for (int i = 0; i < n; i++) {
        str00 += str[i].str0;
    }
    cout << str00;
}
2024/7/25 09:40
加载中...