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