From e9cd7aebb78cb145bbd7f0ee78bbbfffc0b02afc Mon Sep 17 00:00:00 2001 From: oncsr Date: Mon, 21 Jul 2025 16:03:51 +0900 Subject: [PATCH] =?UTF-8?q?[20250721]=20BOJ=20/=20P5=20/=20=ED=8C=8C?= =?UTF-8?q?=EC=82=B0=ED=95=98=EB=8A=94=20=EC=99=95=EA=B5=AD=20/=20?= =?UTF-8?q?=EA=B6=8C=ED=98=81=EC=A4=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0\353\212\224 \354\231\225\352\265\255.md" | 113 ++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 "khj20006/202507/21 BOJ P5 \355\214\214\354\202\260\355\225\230\353\212\224 \354\231\225\352\265\255.md" diff --git "a/khj20006/202507/21 BOJ P5 \355\214\214\354\202\260\355\225\230\353\212\224 \354\231\225\352\265\255.md" "b/khj20006/202507/21 BOJ P5 \355\214\214\354\202\260\355\225\230\353\212\224 \354\231\225\352\265\255.md" new file mode 100644 index 00000000..b3c02af3 --- /dev/null +++ "b/khj20006/202507/21 BOJ P5 \355\214\214\354\202\260\355\225\230\353\212\224 \354\231\225\352\265\255.md" @@ -0,0 +1,113 @@ +```java +import java.util.*; +import java.io.*; + +class IOController { + BufferedReader br; + BufferedWriter bw; + StringTokenizer st; + + public IOController() { + br = new BufferedReader(new InputStreamReader(System.in)); + bw = new BufferedWriter(new OutputStreamWriter(System.out)); + st = new StringTokenizer(""); + } + + String nextLine() throws Exception { + String line = br.readLine(); + st = new StringTokenizer(line); + return line; + } + + String nextToken() throws Exception { + while (!st.hasMoreTokens()) nextLine(); + return st.nextToken(); + } + + int nextInt() throws Exception { + return Integer.parseInt(nextToken()); + } + + long nextLong() throws Exception { + return Long.parseLong(nextToken()); + } + + double nextDouble() throws Exception { + return Double.parseDouble(nextToken()); + } + + void close() throws Exception { + bw.flush(); + bw.close(); + } + + void write(String content) throws Exception { + bw.write(content); + } + +} + +public class Main { + + static IOController io; + + // + + static int N; + static int[][] a; + static boolean[] dp, vis; + + public static void main(String[] args) throws Exception { + + io = new IOController(); + + for(int T=io.nextInt(); T-->0;){ + init(); + solve(); + } + + io.close(); + + } + + public static void init() throws Exception { + + N = io.nextInt(); + a = new int[N][N]; + dp = new boolean[1< 0) return (dp[k] = true); + } + return dp[k]; + } + +} +```