| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 59723 | lihaocheng | 整数的排序 | C++ | Accepted | 0 MS | 252 KB | 268 | 2024-12-27 18:51:33 |
#include <bits/stdc++.h> using namespace std; int a[6]; bool cmp(int x,int y){ if(x<y)return 1; else return 0; } int main(){ for(int i=0; i<5;i++){ cin>>a[i]; } sort(a,a+5,cmp); for(int i=0;i<5;i++){ cout <<a[i]<<" "; } return 0; }