提交记录 5951
| 提交时间 |
评测时间 |
| 2018-09-13 18:49:59 |
2020-08-01 00:36:39 |
#include <stdio.h>
const int MAXN = 100001;
unsigned a[MAXN];
int n;
int main() {
fread(a, 1, MAXN << 1, stdin);
for (int o = (n = a[0]) / 2; o ; --o) {
register int i = o, j;
while ((j = i << 1) <= n){
if (j + 1 <= n && a[j | 1] < a[j]) ++j;
if (a[i] < a[j]) break;
a[i] ^= a[j] ^= a[i] ^= a[j], i = j;
}
}
fwrite(a + 1, 1, n << 1, stdout);
return 0;
}
| Compilation | N/A | N/A | Compile Error | Score: N/A | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2026-04-10 23:37:44 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠