diff --git "a/khj20006/202507/23 BOJ P4 \354\247\201\354\202\254\352\260\201\355\230\225 \353\247\214\353\223\244\352\270\260.md" "b/khj20006/202507/23 BOJ P4 \354\247\201\354\202\254\352\260\201\355\230\225 \353\247\214\353\223\244\352\270\260.md" new file mode 100644 index 00000000..9962f436 --- /dev/null +++ "b/khj20006/202507/23 BOJ P4 \354\247\201\354\202\254\352\260\201\355\230\225 \353\247\214\353\223\244\352\270\260.md" @@ -0,0 +1,106 @@ +```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[] arr; + static boolean[][][][] dp; + + public static void main(String[] args) throws Exception { + + io = new IOController(); + + init(); + solve(); + + io.close(); + + } + + static void init() throws Exception { + + N = io.nextInt(); + arr = new int[N]; + for(int i=0;i