整数二分
闭区间p[a,b];
若条件为x属于p >= c;
满足该条件,区间变为[a,a + b >> 1];
不满足该条件,区间变为(a + b >> 1,b];
a + b >> 1下取整,
因为当区间变为{a,b}时,若向上取整 a + b + 1 >> 1 <==> b;
满足该条件,区间依旧为[a,a + b + 1 >> 1] <==> [a,b];
死循环
若条件为x属于p <= c;
满足该条件,区间变为[a + b + 1 >> 1,b];
不满足该条件,区间变为(a,a + b + 1 >> 1];
a + b + 1 >> 1向上·取整
因为当区间变为{a,b}时,若向下取整 a + b >> 1 <==> a;
满足该条件,区间依旧为[a + b >> 1,b] <==> [a,b];
死循环