From f39e5bf131adb01d14b5ca74e00bfa1fb90282d0 Mon Sep 17 00:00:00 2001 From: oncsr Date: Sun, 7 Sep 2025 19:51:04 +0900 Subject: [PATCH] =?UTF-8?q?[20250907]=20BOJ=20/=20P5=20/=20=ED=8F=AD?= =?UTF-8?q?=ED=83=84=20=EB=8D=98=EC=A7=80=EB=8A=94=20=ED=83=9C=EC=98=81?= =?UTF-8?q?=EC=9D=B4=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 --- ...4 \355\203\234\354\230\201\354\235\264.md" | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 "khj20006/202509/07 BOJ P5 \355\217\255\355\203\204 \353\215\230\354\247\200\353\212\224 \355\203\234\354\230\201\354\235\264.md" diff --git "a/khj20006/202509/07 BOJ P5 \355\217\255\355\203\204 \353\215\230\354\247\200\353\212\224 \355\203\234\354\230\201\354\235\264.md" "b/khj20006/202509/07 BOJ P5 \355\217\255\355\203\204 \353\215\230\354\247\200\353\212\224 \355\203\234\354\230\201\354\235\264.md" new file mode 100644 index 00000000..2f7a07fc --- /dev/null +++ "b/khj20006/202509/07 BOJ P5 \355\217\255\355\203\204 \353\215\230\354\247\200\353\212\224 \355\203\234\354\230\201\354\235\264.md" @@ -0,0 +1,93 @@ +```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, M; + static long[][] h, c, s; + + public static void main(String[] args) throws Exception { + + io = new IOController(); + + N = io.nextInt(); + M = io.nextInt(); + h = new long[N+1][N+1]; + c = new long[N+1][N+1]; + s = new long[N+1][N+1]; + for(int i=0;i