From 02e7c6c67a8744d989ce06ba5a5bce5f183a349a Mon Sep 17 00:00:00 2001 From: oncsr Date: Mon, 3 Mar 2025 21:42:08 +0900 Subject: [PATCH] =?UTF-8?q?[20250303]=20BOJ=20/=20P5=20/=20=EB=B0=9C?= =?UTF-8?q?=EC=A0=84=EC=86=8C=20/=20=EA=B6=8C=ED=98=81=EC=A4=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...5 \353\260\234\354\240\204\354\206\214.md" | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 "khj20006/202503/03 BOJ P5 \353\260\234\354\240\204\354\206\214.md" diff --git "a/khj20006/202503/03 BOJ P5 \353\260\234\354\240\204\354\206\214.md" "b/khj20006/202503/03 BOJ P5 \353\260\234\354\240\204\354\206\214.md" new file mode 100644 index 00000000..7707d95a --- /dev/null +++ "b/khj20006/202503/03 BOJ P5 \353\260\234\354\240\204\354\206\214.md" @@ -0,0 +1,82 @@ +```java + +import java.util.*; +import java.io.*; + + +class Main { + + // IO field + static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); + static BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); + static StringTokenizer st; + + static void nextLine() throws Exception {st = new StringTokenizer(br.readLine());} + static int nextInt() {return Integer.parseInt(st.nextToken());} + static long nextLong() {return Long.parseLong(st.nextToken());} + static void bwEnd() throws Exception {bw.flush();bw.close();} + + // Additional field + static int[][] D, C; + static int N, P, ans; + static final int INF = (int)1e9; + static int start = 0; + + public static void main(String[] args) throws Exception { + + ready(); + solve(); + + bwEnd(); + + } + + static void ready() throws Exception{ + + N = Integer.parseInt(br.readLine()); + D = new int[N][1<= P ? 0 : INF; + + } + + static void solve() throws Exception{ + + for(int i=0;i= P-1) ans = Math.min(ans, D[n][k]); + return D[n][k]; + } + +} + +```