基本二分查找 int main(void) { int n, x; scanf("%d", &n); for(int i = 0; i < n; i++) { scanf("%d", &a[i]); } sort(a, a+n); scanf("%d", &x); int l = 0, h = n-1; while(l <= h) { int mid = (l + h) / 2; ...