int l=0,r=inf;while(l<=r){ int mid=(l+r)>>1; if(pd(mid)){ ans=mid; r=mid-1; } else l=mid+1; }
来源: http://www.bubuko.com/infodetail-3129552.html