From 49e005343eade1af7ffad6dff408d06a9a7cea2b Mon Sep 17 00:00:00 2001 From: suyeun84 <81475092+suyeun84@users.noreply.github.com> Date: Thu, 17 Jul 2025 16:55:54 +0900 Subject: [PATCH] =?UTF-8?q?[20250717]=20BOJ=20/=20G5=20/=20=EB=91=90=20?= =?UTF-8?q?=EA=B0=9C=EC=9D=98=20=ED=83=91=20/=20=EA=B9=80=EC=88=98?= =?UTF-8?q?=EC=97=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... \352\260\234\354\235\230 \355\203\221.md" | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 "suyeun84/202507/17 BOJ G5 \353\221\220 \352\260\234\354\235\230 \355\203\221.md" diff --git "a/suyeun84/202507/17 BOJ G5 \353\221\220 \352\260\234\354\235\230 \355\203\221.md" "b/suyeun84/202507/17 BOJ G5 \353\221\220 \352\260\234\354\235\230 \355\203\221.md" new file mode 100644 index 00000000..52e771e3 --- /dev/null +++ "b/suyeun84/202507/17 BOJ G5 \353\221\220 \352\260\234\354\235\230 \355\203\221.md" @@ -0,0 +1,41 @@ +```java +import java.util.*; +import java.io.*; + +public class boj2118 { + static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); + static StringTokenizer st; + static void nextLine() throws Exception {st = new StringTokenizer(br.readLine());} + static int nextInt() {return Integer.parseInt(st.nextToken());} + + public static void main(String[] args) throws Exception { + nextLine(); + int N = nextInt(); + int sum = 0; + int[] dist = new int[N+1]; + + for(int i=0;i