[프로그래머스/자바] 거리두기 확인하기
import java.util.*; class Solution { class Point { int row, col, dtc; Point(int row, int col, int dtc) { this.row = row; this.col = col; this.dtc = dtc; } } private static final int[][] D = {{1,0}, {-1,0}, {0,1}, {0,-1}}; private boolean bfs(String[] place, int x, int y) { boolean[][] visited = new boolean[5][5]; Queue q = new LinkedList(); visited[x][y] = true; q.add(new Point(x, y, 0)); while ..