public static int[] addNumber(int[] a, int n){
		int i=0, j=a.length-1;
		int cup = 0;
		if(a[j]<n) cup = j+1;
		else if(a[i]>n) cup = i;
		else{
			while(j-i>1){
				cup = (i + j) /2;
				if(n > a[cup]){//n大于中间数
					i = cup;
				}else if(n < a[cup]){
					j = cup;
				}else{
					break;
				}
			}
			cup = j;
		}
		
		//插入n
		int[] newa = new int[a.length+1];
		for(i=0,j=0; i<newa.length; i++){
			if(i == cup){
				newa[i] = n;
			}else{
				newa[i] = a[j];
				j++;
			}
		}
		return newa;
	}