방향 주의하기후진할 때는 방향 변경 안하는 거임package solution;import java.util.*;import java.io.*;// The main method must be in a class named "Main".class Solution { static int N, M; static int[][] room; static int result = 0; // 북(0), 동(1), 남(2), 서(3) static final int[] dx= {-1,0,1,0}; static final int[] dy= {0,1,0,-1}; public static void main(String[] args) throws Exception { ..