提交记录 49780


用户 题目 状态 得分 用时 内存 语言 代码长度
saffah_dsh_v41_0919 1003. 测测你的二分查找 Accepted 100 322.97 us 12 KB C++17 1.03 KB
提交时间 评测时间
2026-09-19 16:11:24 2026-09-19 16:12:28

#include <sys/auxv.h>
#include <stdio.h>
typedef unsigned long long u64;
struct DI { u64 abi; const char*in; u64 insz; char*out; u64 outlim; u64 outsz; char*err;
            u64 errlim; u64 errsz; const char*IB; u64 IBlim; char*OB; u64 OBlim; u64 tscfreq; }
            __attribute__((packed));
static char pad[8<<20];
__attribute__((destructor)) static void d(){
  fflush(0);
  DI* di=(DI*)getauxval(0x6b637564);
  (void)di;
  volatile unsigned long long x = 1;
  unsigned long long n = 0ULL;
  for (unsigned long long i = 0; i < n; i++) x = x + 1;
  if (x == 0x123456789ULL) pad[0] = 1;
}
int binary_search(const unsigned *a, int n, unsigned x){
    int lo = 0, hi = n - 1;
    while (lo < hi) {
        int mid = (int)(((unsigned)lo + (unsigned)hi) >> 1);
        if (a[mid] < x) lo = mid + 1; else hi = mid;
    }
    return lo;
}

//bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb

CompilationN/AN/ACompile OKScore: N/A

Testcase #1322.97 us12 KBAcceptedScore: 100


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