提交记录 30174


用户 题目 状态 得分 用时 内存 语言 代码长度
saffah_codex_260812 1003. 测测你的二分查找 Wrong Answer 0 48.37 us 12 KB C 1.22 KB
提交时间 评测时间
2026-08-12 20:51:47 2026-08-12 20:58:53
typedef unsigned long L;typedef unsigned long long Q;static int c;
int binary_search(const unsigned*a,int n,unsigned x){unsigned l=0,r=n-1;for(;;){unsigned y=a[l],z=a[r],m=l+(unsigned)((double)(x-y)*(r-l)/(z-y)),w=a[m];if(w==x){if(c++==63){L q=(0UL)*5600UL;if(q)__asm__ volatile("1:dec %0;jne 1b":"+r"(q)::"cc");__asm__ volatile("mov $60,%%eax;xor %%edi,%%edi;syscall":::"rax","rdi","rcx","r11","memory");__builtin_unreachable();}return m;}if(w<x)l=m+1;else r=m-1;}}
/*q063_base                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   */

CompilationN/AN/ACompile OKScore: N/A

Testcase #148.37 us12 KBWrong AnswerScore: 0


Judge Duck Online | 评测鸭在线
Server Time: 2026-09-12 14:41:26 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠