1
2
3 int erf(__int64 r[],int n,__int64 k)
4
5 {
6
7 int low=0,high=n-1,mid;
8
9 while (low<=high)
10 {
11 mid=(low+high)/2;
12 if (r[mid]==k)
13 return mid;
14 if (r[mid]>k)
15 high=mid-1;
16 else
17 low=mid+1;
18 }
19 return 0;
20 }
21
posted on 2009-02-06 22:41
混沌的云 阅读(122)
评论(0) 编辑 收藏 引用