Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
why?void solve() { int left=0,right=n/2,ans; while(left<=right) { mid=(left+right)/2; if(check()) left=mid+1,ans=mid; else right=mid-1; } if(ans>=4) printf("%d\n",ans+1); else printf("0\n"); } AC,但left=4就wa,大牛们能回答下吗? Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator