#include<bits/stdc++.h> using namespace std; int main(){ int l=1,r=n+1,mid,k; while (l+1<r){ mid=(l+r)>>1; if (solve(mid)<=k) l=mid; else r=mid; } printf("%d",l); return 0; }
原文地址:https://www.cnblogs.com/cain-/p/9519922.html
时间: 2024-10-31 03:33:18