提交记录 14017
提交时间 |
评测时间 |
2020-08-21 12:20:48 |
2020-08-21 12:20:51 |
int binary_search(const unsigned *line, int ub, unsigned value){
register int down = 0,up = ub - 1;
register int estimate = 0;
while( up - down > 15 ){
estimate = down + 1ull * (up - down) * (value - line[down]) / (line[up] - line[down]);
if( line[estimate] == value )return estimate;
if( line[estimate] < value ) down = estimate + 1;
else up = estimate - 1;
}
while( line[down] ^ value ) down ++;
return down;
}
Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
Testcase #1 | 75.73 us | 12 KB | Accepted | Score: 100 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2024-11-24 02:41:10 | Loaded in 0 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠