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 |
加个d[0] = -1 你那个二分也有问题In Reply To:我知道了,刚刚发现我的程序过不了1 0这组数据:) Posted by:yiyiyi4321 at 2005-12-17 09:28:13 while(left < right) { mid=(left+right)/2; if(a[i] > d[mid]) left = mid+1; if(a[i] < d[mid]) right = mid - 1; if(a[i]==d[mid]) break; } if(a[i] < d[left]) d[left]=a[i]; else if(a[i] > d[left]) d[left+1]=a[i]; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator