본문 바로가기

자바5

[BOJ] 2667번 단지번호붙이기 Java 풀이 https://www.acmicpc.net/problem/2667 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class BJ_2667 { static int n; static int[][] house; static boolean[][] visited; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(n.. 2020. 11. 16.
[BOJ] 4963번 섬의 개수 java 풀이 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { static int w, h; static int[][] map = new int[51][51]; static StringBuilder sb = new StringBuilder(); public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); while (true) { String[] s = br.readLine().split(".. 2020. 11. 16.
[BOJ] 2178번 미로 탐색 java 풀이 https://www.acmicpc.net/problem/2178 package acmicpc; import java.io.*; import java.util.LinkedList; import java.util.Queue; class Pos { int x, y; Pos(int x, int y) { this.x = x; this.y = y; } } public class BJ_2178 { static int[] dx = {1, -1, 0, 0}; static int[] dy = {0, 0, 1, -1}; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStream.. 2020. 11. 16.
[BOJ] 7576번 토마토 java 풀이 https://www.acmicpc.net/problem/7576 package acmicpc.BJ_7576; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.LinkedList; import java.util.Queue; class Pos{ int x, y; Pos(int x, int y) { this.x = x; this.y = y; } } public class BJ_7576 { static int[] dx = {1, -1, 0, 0}; static int[] dy = {0, 0, 1, -1}; public static void main(String[].. 2020. 11. 16.