二分的标准写法是这样的……
while(l + 1 < r){
____m = (long long)l + r >> 1;
____if(check(m))
________l = m;
____else
________r = m;
}
if(check(l))
____m = l;
else if(check(r))
____m = r;
else
____m = NONE;
return m;
while(l + 1 < r){
____m = (long long)l + r >> 1;
____if(check(m))
________l = m;
____else
________r = m;
}
if(check(l))
____m = l;
else if(check(r))
____m = r;
else
____m = NONE;
return m;