提交记录 14010
| 提交时间 |
评测时间 |
| 2020-08-21 12:09:39 |
2020-08-21 12:09:42 |
int binary_search(const unsigned *line, int ub, unsigned value){
register int down = 0,up=ub - 1;
register int estimate = 0;
while(1){
estimate = down +
(unsigned long long)(up - down) *
(value - line[down]) / (line[up] - line[down]);
if( estimate == down ) ++ estimate ;
if( estimate == up ) -- estimate ;
if( line[estimate] == value )return estimate;
( line[estimate] < value ? down : up ) = estimate;
}
return 0;
}
| Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
| Testcase #1 | 80.15 us | 12 KB | Accepted | Score: 100 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2026-03-23 07:59:21 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠