void solve() {//二分 int l = 0, r = INF;//二分范围 for (int i = 0; i < 50; i++) { int mid = (l + r) / 2; if (C(mid))l = mid;//满足条件函数寻找更优解,往更大的x找 else r = mid;//不满足条件函数往更小的x找 } }