int l=0,r=maxn-1; int ans=-1; while(l<=r) { int mid=(l+r)/2; if(check(mid)) { ans=mid; r=mid-1; } else { l=mid+1; } } if(ans==-1) printf("Not Find! "); else printf("%d ",ans);