import java.util.Scanner;
public class 矩阵{
public static void main(String args[]){
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int[] a=new int[n];
int i=0;
for(;i<n;i++){
a[i]=sc.nextInt();
}
int p=sc.nextInt();
int low=0;
int high=a.length;
while(low<=high){
int mid=(low+high)/2;
if(p<a[mid]){
high=mid-1;
}else if(p>a[mid]){
low=mid+1;
}else if(p==a[mid]){
System.out.print("It's position is "+mid+"!");
}
}
System.out.print("No data!");
}
}
应该怎么改?