Skip to content

实数二分 ​

cpp
while(l+eps<r){
    double mid=(l+r)/2;
    if(check(mid))l=mid;
    else r=mid;
}