//数组增序减序无所谓 class BinarySearch { public: int getPos(vector<int> A, int n, int val) { if(n<=0) return -1; int left = 0,right = n-1; while(left<=right) { int mid = (left+right)/2; if(val == A[mid]) { in...