Lang:Java
Edit12345678910111213141516171819202122232425262728293031import java.util.Scanner;import java.io.IOException;class Main{static int MAX(int a,int b){return (a>b)?a:b;}static int min(int a,int b){return a>b?b:a;}static class Path{int N,M;char path[][];//int min[][];int minR[][];int minD[][];void todo() throws IOException{Scanner sc = new Scanner(System.in);N = sc.nextInt();M = sc.nextInt();path = new char [N+2][M+2];//min = new int[M+1][N+1];minR = new int[N+1][M+1];minD = new int[N+1][M+1];for(int i = 0; i <= N+1; i++ ){if(i!=0&&i!=N+1){String str = sc.next();path[i][0] = 'b';