国名排序 题解:
#include<bits/stdc++.h>
using namespace std;
int main(){
int n; cin >> n;
vector<string> countries(n);
for(int i = 0; i < n; i++) cin >> countries[i];
sort(countries.begin(), countries.end());
for(string &s : countries) cout << s << endl;
return 0;
}
登录后发布评论
暂无评论,来抢沙发