Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
102102 | 陈志恒 | 三实数排序 | C++ | 解答错误 | 75 | 0 MS | 252 KB | 246 | 2023-09-12 13:28:18 |
#include<bits/stdc++.h> using namespace std; priority_queue<int,vector<int>,greater<int> >q; int main(){ int n; n=3; for(int i=1;i<=n;i++) {int x;cin>>x;q.push(x);} for(int i=1;i<=n;i++) {cout<<q.top()<<" ";q.pop();} return 0; }