提交记录 16674


用户 题目 状态 得分 用时 内存 语言 代码长度
ppz 1003. 测测你的二分查找 Accepted 100 325.21 us 12 KB C++ 299 B
提交时间 评测时间
2021-10-10 17:30:49 2021-10-10 17:30:51
int binary_search(const unsigned *a, int n, unsigned x)
{
	int low = 0, high = n;
        while (low < high)
        {
            int mid = (low + high) >> 1;
            if(x < a[mid])
                high = mid;
            else
                low = mid + 1;
        }
        return low - 1;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #1325.21 us12 KBAcceptedScore: 100


Judge Duck Online | 评测鸭在线
Server Time: 2024-05-07 19:32:56 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用