提交记录 10284
| 提交时间 |
评测时间 |
| 2019-09-17 10:52:30 |
2020-08-01 02:05:06 |
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <functional>
#define re int
namespace judgeduck {
extern char *stdin_content;
extern int stdin_size;
extern char *stdout_content;
extern int stdout_size;
extern int stdout_max_size;
}
int n = *(int*)judgeduck::stdin_content;
#define a ((int*)(judgeduck::stdout_content))
inline void down(const int& x) {
re i = x, j;
while (i << 1 <= n) {
j = i;
if (a[i << 1] < a[i]) j = i << 1;
if ((i << 1 | 1) <= n && a[i<<1|1] < a[j]) j = i << 1 | 1;
if (i == j) break;
a[i] ^= a[j] ^= a[i] ^= a[j], i = j;
}
}
int main() {
using namespace judgeduck;
memcpy(stdout_content, stdin_content+4, stdout_size = n<<2);
for (int i = n >> 1; i; down(i--));
return 0;
}
| Compilation | N/A | N/A | Compile Error | Score: N/A | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2026-03-29 19:59:45 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠