public static void main(String[] args) {
		//int[] p = {30,35,15,5,10,20,25};//ϵ
		/*int[] p = {0,15,10,5,10,20};
		int[] q = {5,10,5,5,5,10};*/
		int[] p = {0,4,6,8,2,10,12,14};
		int[] q = {6,6,6,6,5,5,5,5};
		int n =p.length;
		int e[][] = new int [n+1][n];
		int w[][] = new int [n+1][n];
		int root[][] = new int [n][n];
		optimalBst(p, q, e, w, root);
		//optimalBst(p, m, s);
		//System.out.println("ΪK"+root[1][n-1]);
		printOptimal(root, 1, n-1);
	}