摘要:
1 # include 2 3 int search(int a[], int n, int v) //这个好像是效率最高的 4 { 5 int left = -1, right = n, middle; 6 while(left+1 != right) 7 { 8 middle = left + (right-left) / 2; 9 if(a[middle] = n || a[right] != v)15 right = -1;16 return right;17 }18 19 int search... 阅读全文