文章

34

粉丝

0

获赞

6

访问

989

头像
国名排序 题解:
P1217 同济大学机试题
发布于2025年8月6日 16:38
阅读数 23

#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;
}

 

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发