BaekJoon 14503, 로봇 청소기
제가 dfs를 사용하는 것에 맛들렸을 때 풀었던 문제들이라 dfs를 엄청 남발하면서 삼성 문제들을 풀었던 것 같습니다. https://www.acmicpc.net/problem/14503 문제는 위 링크에서의 조건에 맞도록 로봇청소기의 이동 경로를 생각하면 되는 간단한 문제입니다. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 import java.util.Scanner ; public class BaekJoon14503 { static int N, M, r, c, d, count; static int [][] table; static Point current; static boolean isOperate = true ; final static int NORTH = 0 , EAST = 1 , SOUTH = 2 , WEST = 3 ; public static void main (String[] args) { Scanner sc = new Scanner(System. in ); N = sc. nextInt ();M = sc. nextInt (); r = sc. nextInt (); c = sc. nextInt (); current = new Point(r, c);count = 0 ; d = sc. nextInt ();table = new int [N][M]; for ( int ...