ACM二维数组的读取
输入
5 5
0 1 0 0 0
0 1 1 1 0
0 0 0 0 0
0 1 1 1 0
0 0 0 1 0
读取
Scanner in = new Scanner(System.in);
int row = in.nextInt();
int col = in.nextInt();
int[][] arr = new int[row][col];
for (int i = 0; i < row; i++) {
for (int j = 0; j < col; j++) {
arr[i][j] = in.nextInt();
}
}
标签:读取,int,ACM,nextInt,二维,col,row
From: https://www.cnblogs.com/aclq/p/17689068.html