728x90

2024/05 10

61 삐약 : 백준 7576| 토마토 [바킹독 문제 풀이|BFS|JAVA]

https://www.acmicpc.net/problem/7576  package BKD_0x9_BFS;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.LinkedList;import java.util.Queue;import java.util.StringTokenizer;public class BOJ_7576 { static int[] dx ={0,1,0,-1}; static int[] dy ={1,0,-1,0}; static int M; static int N; static int[][] box; static Queue q = n..

60 삐약 : 백준 2468| 안전 영역 [바킹독 문제 풀이|BFS|JAVA]

https://www.acmicpc.net/problem/2468  package BKD_0x9_BFS;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.*;public class BOJ_2468 { static int[][] input; static int[][] visited; static int N; static int[] dx ={0,1,0,-1}; static int[] dy ={1,0,-1,0}; public static void main(String[] args) throws IOException { Buff..

59 삐약 : 백준 2667| 단지번호붙이기 [바킹독 문제 풀이|BFS|JAVA]

https://www.acmicpc.net/problem/2667 package BKD_0x9_BFS;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.*;public class BOJ_2667 { static int N; static char[][] apts; static int[] dx ={0,1,0,-1}; static int[] dy ={1,0,-1,0}; public static void main(String[] args) throws IOException { BufferedReader br = new Buffered..

58 삐약 : 백준 2583| 영역구하기 [바킹독 문제 풀이|BFS|JAVA]

https://www.acmicpc.net/problem/2583  package BKD_0x9_BFS;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.lang.reflect.Array;import java.util.*;public class BOJ_2583 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new ..

57 삐약 : 백준 7562| 나이트의 이동 [바킹독 문제 풀이|BFS|JAVA]

https://www.acmicpc.net/problem/7562 package BKD_0x9_BFS;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.LinkedList;import java.util.Queue;import java.util.StringTokenizer;public class BOJ_7562 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in));..

55 삐약 : 백준 1697| 숨바꼭질 [바킹독 문제 풀이|BFS|JAVA]

https://www.acmicpc.net/problem/1697  package BKD_0x9_BFS;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.LinkedList;import java.util.Queue;import java.util.StringTokenizer;public class BOJ_1697 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in))..

54 삐약 : 백준 2178| 미로탐색 [바킹독 문제 풀이|BFS|JAVA]

https://www.acmicpc.net/problem/2178 package BKD_0x9_BFS;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.LinkedList;import java.util.Queue;import java.util.StringTokenizer;public class BOJ_2178 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System..

53 삐약 : 백준 5430| 회전하는큐 [바킹독 문제 풀이Deque|JAVA]

https://www.acmicpc.net/problem/5430  package BKD_0x7_Deque;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.LinkedList;public class BOJ_5430 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int T = Integer.parseInt(br.readLine()); ..

52 삐약 : 백준 1021| 회전하는큐 [바킹독 문제 풀이Deque|JAVA]

https://www.acmicpc.net/problem/1021 package BKD_0x7_Deque;import java.io.BufferedReader;import java.io.BufferedWriter;import java.io.IOException;import java.io.InputStreamReader;import java.util.ArrayList;import java.util.Deque;import java.util.LinkedList;import java.util.StringTokenizer;public class BOJ_1021 { public static void main(String[] args) throws IOException { LinkedList dq ..

728x90