网恋被骗五毛  •  9个月前


include <bits/stdc++.h>

using namespace std;

int main() {

priority_queue<int, vector<int>, greater<int>>q;
int n, x, y;
cin >> n;
for (int i = 1; i <= n; i++) {
	cin >> x;
	q.push(x);
}
while (!q.empty()) {
	cout << q.top() << " ";
	q.pop();
}

}


评论:

请先登录,才能进行评论