Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
167162 | 袁梓皓_B班 | 常用排序法 | C++ | 运行超时 | 95 | 1552 MS | 1024 KB | 354 | 2024-08-19 16:10:02 |
#include <bits/stdc++.h> using namespace std; #define MAXN 100010 long long a[MAXN]; int main() { int n; cin >> n; for(int i = 1; i <= n; i ++) cin >> a[i]; for(int i = 1; i <= n; i ++) for(int j = i + 1; j <= n; j ++) if(a[i] > a[j]) swap(a[i],a[j]); for(int i = 1; i <= n; i ++) printf("%lld ",a[i]); return 0; }