//路径的打印,数组的每一个元素代表它的走向,通过统计它前面0,1个数判断它的坐标,依次打印
public static void Print(int[] result){
int countx = 0;
int county = 0;
System.out.println("我是分割线");
for (int i = 0; i <result.length ; i++) {
if(result[i] == 0){
countx++;
}else{
county++;
}
System.out.println(countx + " "+county + ";");
}
}
public static void main(String[] args) {
int m = 2;
int n = 2;
int[] result = new int[m+n]; //从起点一共需要m+n步走到头,定义的数组长度为m+n
Load(m,n,result);
}
}