From 9fd46080d5e6cbcb2f65dc098f9e9d60ab7991d4 Mon Sep 17 00:00:00 2001 From: suyeun84 <81475092+suyeun84@users.noreply.github.com> Date: Fri, 14 Mar 2025 10:58:59 +0900 Subject: [PATCH] =?UTF-8?q?[20250314]=20BOJ=20/=20G3=20/=20=ED=94=BC?= =?UTF-8?q?=EB=A6=AC=20=EB=B6=80=EB=8A=94=20=EC=82=AC=EB=82=98=EC=9D=B4=20?= =?UTF-8?q?/=20=EA=B9=80=EC=88=98=EC=97=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...4 \354\202\254\353\202\230\354\235\264.md" | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 "suyeun84/202503/14 BOJ G3 \355\224\274\353\246\254 \353\266\200\353\212\224 \354\202\254\353\202\230\354\235\264.md" diff --git "a/suyeun84/202503/14 BOJ G3 \355\224\274\353\246\254 \353\266\200\353\212\224 \354\202\254\353\202\230\354\235\264.md" "b/suyeun84/202503/14 BOJ G3 \355\224\274\353\246\254 \353\266\200\353\212\224 \354\202\254\353\202\230\354\235\264.md" new file mode 100644 index 00000000..43a56940 --- /dev/null +++ "b/suyeun84/202503/14 BOJ G3 \355\224\274\353\246\254 \353\266\200\353\212\224 \354\202\254\353\202\230\354\235\264.md" @@ -0,0 +1,59 @@ +```java +import java.io.*; +import java.util.*; + +public class boj16724 { + static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); + + static boolean[][] visited, finished; + static int answer; + static int[][] board; + static int[] dr = {-1,1,0,0}; + static int[] dc = {0,0,-1,1}; + public static void main(String[] args) throws Exception{ + StringTokenizer st = new StringTokenizer(br.readLine()); + + int N = Integer.parseInt(st.nextToken()); + int M = Integer.parseInt(st.nextToken()); + + board = new int[N][M]; + visited = new boolean[N][M]; + finished = new boolean[N][M]; + answer = 0; + + for(int i=0;i