public static void main(String[] args) {
int T = sc.nextInt();
for (int i = 1; i <= T; i++) {
int xs ;
int n = sc.nextInt();
int divisor = 1;
for (int j = 0; j < n -1;j++){
divisor = divisor * 10;
}
//System.out.println(divisor + "/" + n);
int[][] matrix = new int[n][n];
int[][] matrix2 = new int[n][n];
for (int k = 0; k < n; k++) {
int d2 = divisor;
xs = sc.nextInt();
System.out.println(xs);
// System.out.println("\n"+xs + "df" + xs.length());
for (int l = 0; l < n; l++) {
matrix[k][l] = xs / d2;
matrix2[k][l] = 0;
xs = xs % d2;
divisor = d2/10;
}
}
// System.out.println("Hello");
matrix2[0][0] = 1;
Node node = new Node(0, 0);
node.dis = 0;
node.steps = 0;
node.c = 0;
openList[0] = node;
util_expl(node, matrix, matrix2, n);
fun(matrix, matrix2, n);
System.out.println(res);
}
}//
我的输入例如是
1
4
0100
1110
1011
1010
但我的扫描仪因为无法正确输入而卡住了。我立刻粘贴整个输入
我打印线来检查输入是否正确,但答案是这样的
100个
1110
1010
然后就会卡住。