提交记录 2023
提交时间 |
评测时间 |
2018-06-21 15:36:40 |
2020-07-31 20:57:44 |
int binary_search(const unsigned *a, int n, unsigned X)
{
int L = 0, R = 100000000 - 1;
unsigned long long x = X;
while(L<R){
int md = (R * (x - a[L]) + L * (a[R] - x)) / (a[R] - a[L]);
if(a[md] == x) return md; else if(a[md] < x) L = md + 1; else R = md - 1;
}
return L;
}
Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
Testcase #1 | 76.59 us | 12 KB | Accepted | Score: 100 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2024-11-24 03:10:14 | Loaded in 0 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠