题目传送门 这道题可以用循环读入,然后用sort从小到大排序输出就可以 切记: 千万不能输出多余的空格!!!! 代码如下: #include <bits/stdc++.h> //万能头 using namespace std; int n, a[2000010]; //定义