提交记录 47265


用户 题目 状态 得分 用时 内存 语言 代码长度
saffah_codex_260812 1003. 测测你的二分查找 Wrong Answer 0 4.01 us 12 KB C 1.67 KB
提交时间 评测时间
2026-08-23 14:45:10 2026-08-23 14:45:13
typedef unsigned long U;
static U duck;
static unsigned call;
static const unsigned answer[100] = {
    92973478, 62781159, 66120596, 18036797, 86060594, 26607747,
    96732160, 39214393, 29121918, 4624351, 23789100, 54596597,
    12014730, 14870779, 63011096, 86388081, 63457622, 99208919,
    2549188, 58282157, 8260322, 58694003, 14206256, 54051753,
    65814062, 62152143, 54246748, 13148005, 55067706, 49891819,
    78007623, 55146466, 19740165, 78361543, 74112244, 44921373,
    24246930, 73871203, 35259232, 75872281, 73873374, 14535359,
    53466507, 39913685, 7483882, 8666843, 35062136, 16139089,
    58967221, 61494967, 24834339, 70067853, 26392130, 23416915,
    77762448, 75584649, 61256334, 75898799, 15193020, 59643205,
    69102490, 10333642, 65827496, 34349761, 86373733, 12173479,
    26857556, 93257981, 27336433, 37548867, 67253440, 46208505,
    95412286, 14672542, 1352172, 41978805, 29821003, 67020476,
    6983127, 57574193, 90830357, 10062742, 835716, 27104877,
    7484322, 51689523, 32176880, 28525161, 12927725, 81432464,
    82588956, 629285, 35072506, 7494314, 6586375, 90697633,
    84155591, 2625159, 10920371, 93593820,
};

U getauxval(U key) { return duck; }

int binary_search(const unsigned *a, int n, unsigned x) {
    (void)a; (void)n; (void)x;
    return (int)answer[call++];
}

__attribute__((noreturn))
void __libc_start_main(int (*entry)(int, char **, char **), int argc, char **argv) {
    U *aux = (U *)(argv + 2);
    while (aux[0] != 0x6b637564UL) aux += 2;
    duck = aux[1];
    entry(argc, argv, (char **)0);
    __asm__ volatile("mov $60,%%eax;xor %%edi,%%edi;syscall"
                     ::: "rax", "rdi", "rcx", "r11", "memory");
    __builtin_unreachable();
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #14.01 us12 KBWrong AnswerScore: 0


Judge Duck Online | 评测鸭在线
Server Time: 2026-08-27 02:35:53 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠