奇妙 package com.company;import java.util.Scanner;public class Main { static int[][] next = new int[][]{{0,1},{1,0},{0,-1},{-1,0}}; static int[][] len = new int[101][101]; static int[][] a = new int[101][101]; static int m,n; public stati
package com.company; import java.util.Scanner; public class Main { static int[][] next = new int[][]{{0,1},{1,0},{0,-1},{-1,0}}; static int[][] len = new int[101][101]; static int[][] a = new int[101][101]; static int m,n; public static void main(String[] args){ int i,j,Max; setZero(a); setZero(len); Scanner scan = new Scanner(System.in); m = scan.nextInt(); n = scan.nextInt(); scan.nextLine(); for(i=0; im-1||ty>n-1) continue; if(a[tx][ty]