public static int lis(int[] arr) {
		int arrLen = arr.length;// 鳤
		int curLen = 1;// ǰӴ
		int sub[] = new int[arrLen];// 洢ִΪi+1iΪ±꣩Сĩβ
		int sub_index[] = new int[arrLen];// 洢ִΪi+1iΪ±꣩Сĩβԭеλ
		int sub_pre[] = new int[arrLen];// 洢ִΪi+1iΪ±꣩Сĩβֵǰһֵ
		sub[0] = arr[0];//ʼ
		sub_pre[0]=-1;
		//ֲʹñ
		int left =0;
		int right =0; 
		int mid=0;
		
		//ɨ
		for (int i = 1; i < arrLen; i++) {
			sub_pre[i]=-1;
			//ֲңλǰԪλ(صһarr[i]λ)ʱ临ӶO(lgN)
			left = 0;
			right =curLen-1;
			while(left <= right){
				mid = left + (right-left)/2;//֣
				if (sub[mid]<arr[i]) {
					left = mid +1;
				}else {
					right = mid -1;
				}
			}
			sub[left]=arr[i];
			sub_index[left]=i;
			if (left>0) {
				sub_pre[i]=sub_index[left-1];
			}
			if (left == curLen) {//arr[i]subԪضһsubԪ
				curLen++;
			}
		}
		/*for (int i = 0; i < arrLen; i++) {
			System.out.print(" "+sub[i]);
			System.out.print(" "+sub_index[i]);
			System.out.print(" "+sub_pre[i]);
			System.out.println();
		}*/
		//Ӵ洢sub
		int pre = sub_index[curLen-1];
		for (int i = curLen-1; i >=0; i--){
			sub[i]=arr[pre];
			pre = sub_pre[pre];
		}
		//ӡִ
		System.out.printf("ӴΪ %d ֵΪ\n",curLen);
		for (int i = 0; i < curLen; i++) {
			System.out.printf("%5d ",sub[i]);
			if ((MAXNUM-1) == i%MAXNUM){
				System.out.println("");
			}
		}
		System.out.println();
		return curLen ;
	}