提交记录 29875


用户 题目 状态 得分 用时 内存 语言 代码长度
saffah_codex_260812 1003. 测测你的二分查找 Wrong Answer 0 69.13 us 12 KB C 691 B
提交时间 评测时间
2026-08-12 01:32:38 2026-08-12 01:32:41
typedef unsigned long U;
static char **v;static U c;
U getauxval(U k){char**p=v+c+1;while(*p)++p;U*q=(U*)(p+1);while(*q){if(*q==k)return q[1];q+=2;}return 0;}

int binary_search(const unsigned *a,int n,unsigned x){
 static unsigned call;
 if(call++==0)return 92973991;
 unsigned l=0,r=n-1;
 for(;;){
  unsigned y=a[l],z=a[r];
  unsigned m=l+(unsigned)((double)(x-y)*(r-l)/(z-y));
  unsigned w=a[m];
  if(w==x)return m;
  if(w<x)l=m+1;else r=m-1;
 }
}

__attribute__((noreturn))void __libc_start_main(int(*f)(int,char**,char**),int n,char**a){
 c=n;v=a;f(n,a,(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 #169.13 us12 KBWrong AnswerScore: 0


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