摘要:
int Bi_Search(int a[],int n,int b)//{//返回等于b的第一个 if(n==0) return -1; int low = 0; int high = n-1; int last = -1;//用last记录上一次满足条件的下标 while (lowb) high = mid -1; else low = mid +1; } return last;}int Bi_Search1(int a[],int n,int b)//大于b的第一个数{ if(nb) { last = mid; high = mid -1; } else if ... 阅读全文
posted @ 2014-02-16 17:13
goodniao_1
阅读(121)
评论(0)
推荐(0)
2014年2月16日