백준 14503번: 로봇 청소기[JAVA]
https://www.acmicpc.net/problem/14503 14503번: 로봇 청소기 첫째 줄에 방의 크기 $N$과 $M$이 입력된다. $(3 \le N, M \le 50)$ 둘째 줄에 처음에 로봇 청소기가 있는 칸의 좌표 $(r, c)$와 처음에 로봇 청소기가 바라보는 방향 $d$가 입력된다. $d$가 $0$인 경우 북쪽 www.acmicpc.net [정답 코드] import java.io.*; import java.util.*; public class Main { static int N, M; static int[][] room; static int[] dx = {-1, 0, 1, 0}; static int[] dy = {0, 1, 0, -1}; // 북, 동, 남, 서 순서 static i..