스택2 구름톤 챌린지 3주 Day3 - 발전기(2) 발전기 (2) (Java) 제출한 답 : import java.util.*; public class Main { static int N, K; static int[][] matrix; static boolean[][] visited; static int[] dr = {-1, 1, 0, 0}; static int[] dc = {0, 0, -1, 1}; static class Point { int r, c; public Point(int r, int c) { this.r = r; this.c = c; } } public static void main(String[] args) { Scanner sc = new Scanner(System.in); N = sc.nextInt(); K = sc.nextInt();.. 2023. 9. 2. 구름톤 챌린지 3주 Day2 - 발전기 발전기 (Java) 제출한 답 : import java.util.*; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int N = scanner.nextInt(); int count = 0; int[][] matrix = new int[N][N]; boolean[][] visited = new boolean[N][N]; int[] dy = {1, -1, 0, 0}; int[] dx = {0, 0, 1, -1}; for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { matrix[i][j] = scanner.nextIn.. 2023. 9. 2. 이전 1 다음