From 2029680614dd32b4ae437875a57182295daae9eb Mon Sep 17 00:00:00 2001 From: oncsr Date: Tue, 11 Mar 2025 14:53:00 +0900 Subject: [PATCH] =?UTF-8?q?[20250311]=20BOJ=20/=20P5=20/=20=EB=93=B1?= =?UTF-8?q?=EC=82=B0=20=EB=A7=88=EB=8B=88=EC=95=84=20/=20=EA=B6=8C?= =?UTF-8?q?=ED=98=81=EC=A4=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0 \353\247\210\353\213\210\354\225\204.md" | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 "khj20006/202503/11 BOJ P5 \353\223\261\354\202\260 \353\247\210\353\213\210\354\225\204.md" diff --git "a/khj20006/202503/11 BOJ P5 \353\223\261\354\202\260 \353\247\210\353\213\210\354\225\204.md" "b/khj20006/202503/11 BOJ P5 \353\223\261\354\202\260 \353\247\210\353\213\210\354\225\204.md" new file mode 100644 index 00000000..0f5415dd --- /dev/null +++ "b/khj20006/202503/11 BOJ P5 \353\223\261\354\202\260 \353\247\210\353\213\210\354\225\204.md" @@ -0,0 +1,79 @@ +```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 N; + static List[] V; + static long[] S; + static long ans = 0; + + public static void main(String[] args) throws Exception { + + ready(); + solve(); + + bwEnd(); + + } + + static void ready() throws Exception{ + + N = Integer.parseInt(br.readLine()); + V = new List[N+1]; + S = new long[N+1]; + for(int i=1;i<=N;i++) V[i] = new ArrayList<>(); + for(int i=1;i