文章

105

粉丝

69

获赞

117

访问

51.2k

头像
排序 - 华科(C++ 11) 题解:
P1399 华中科技大学
发布于2024年6月2日 20:32
阅读数 478

#include<bits/stdc++.h>
using namespace std;

int n;

int main()
{
	while(cin >> n)
	{
		vector<int> res;
		
		for(int i = 0; i < n; i ++)
		{
			int x; cin >> x;
			res.push_back(x);
		}
		
		sort(res.begin(), res.end());
		
		for(auto x : res)
			cout << x << " ";
		cout << endl;
	}
	
	return 0;
}

 
登录查看完整内容


登录后发布评论

暂无评论,来抢沙发