提交记录 31337
| 提交时间 |
评测时间 |
| 2026-08-14 01:36:36 |
2026-08-14 01:36:43 |
#include <sys/auxv.h>
#include <stdint.h>
struct DuckInfo {
uint64_t abi_version;
const char *stdin_ptr; uint64_t stdin_size;
char *stdout_ptr; uint64_t stdout_limit; uint64_t stdout_size;
char *stderr_ptr; uint64_t stderr_limit; uint64_t stderr_size;
const char *IB_ptr; uint64_t IB_limit;
char *OB_ptr; uint64_t OB_limit;
uint64_t tsc_frequency;
} __attribute__((packed));
static unsigned a[100001];
static int cmp(const void *x, const void *y) {
unsigned ux = *(const unsigned*)x, uy = *(const unsigned*)y;
return (ux > uy) - (ux < uy);
}
int main() {
struct DuckInfo *di = (struct DuckInfo*)getauxval(0x6b637564);
const unsigned *in = (const unsigned*)di->stdin_ptr;
unsigned n = in[0];
unsigned i;
for (i = 0; i < n; i++) a[i] = in[i + 1];
qsort(a, n, sizeof(unsigned), cmp);
unsigned *out = (unsigned*)di->stdout_ptr;
for (i = 0; i < n; i++) out[i] = a[i];
di->stdout_size = (uint64_t)n * 4;
__asm__ __volatile__("mov $60,%%rax; xor %%edi,%%edi; syscall" ::: "rax","rdi","rcx","r11","memory");
return 0;
}
| Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
| Testcase #1 | 0 ns | 0 KB | Judge Failed | Score: 0 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2026-09-12 09:07:39 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠