From ef3138fb953a919357bd870b0f62ee066fe67747 Mon Sep 17 00:00:00 2001 From: oncsr Date: Sat, 30 Aug 2025 17:51:23 +0900 Subject: [PATCH] =?UTF-8?q?[20250830]=20BOJ=20/=20P4=20/=20=EB=B6=80?= =?UTF-8?q?=EB=AA=A8=EB=8B=98=EA=BB=98=20=ED=81=B0=EC=A0=88=20=ED=95=98?= =?UTF-8?q?=EA=B3=A0=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 --- ...0\354\240\210 \355\225\230\352\263\240.md" | 121 ++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 "khj20006/202508/30 BOJ P4 \353\266\200\353\252\250\353\213\230\352\273\230 \355\201\260\354\240\210 \355\225\230\352\263\240.md" diff --git "a/khj20006/202508/30 BOJ P4 \353\266\200\353\252\250\353\213\230\352\273\230 \355\201\260\354\240\210 \355\225\230\352\263\240.md" "b/khj20006/202508/30 BOJ P4 \353\266\200\353\252\250\353\213\230\352\273\230 \355\201\260\354\240\210 \355\225\230\352\263\240.md" new file mode 100644 index 00000000..4a2e7ab7 --- /dev/null +++ "b/khj20006/202508/30 BOJ P4 \353\266\200\353\252\250\353\213\230\352\273\230 \355\201\260\354\240\210 \355\225\230\352\263\240.md" @@ -0,0 +1,121 @@ +```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; + + public static void main(String[] args) throws Exception { + + io = new IOController(); + + N = io.nextInt(); + a = new int[N]; + int min = Integer.MAX_VALUE; + for(int i=0;i list = new ArrayList<>(); + for(int i=2;i