提交记录 12232


用户 题目 状态 得分 用时 内存 语言 代码长度
user1 ch7344. 鸭子排队 Compile Error 0 0 ns 0 KB C++11 873 B
提交时间 评测时间
2020-03-17 10:28:53 2020-08-01 02:52:54
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <functional>
#define re register int
typedef unsigned int uint;
const int maxn = 1e5 + 1;
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 ((unsigned*)judgeduck::stdout_content-1)
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;
		std::swap(a[i],a[j]), i = j;
	}
}
int _ = [](){
	using namespace judgeduck;
	memcpy(stdout_content, stdin_content+4, stdout_size = n<<2);
        for (re i = n >> 1; i; down(i--));
    asm volatile("int %0"::"i"(48),"a"(18)); // exit
return 0;}();
int main() {}

CompilationN/AN/ACompile ErrorScore: N/A


Judge Duck Online | 评测鸭在线
Server Time: 2026-03-26 10:28:57 | Loaded in 0 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠