From ee6fa84096741c244e9f2023968110efcde76520 Mon Sep 17 00:00:00 2001 From: oncsr Date: Sun, 22 Jun 2025 17:40:05 +0900 Subject: [PATCH] =?UTF-8?q?[20250622]=20BOJ=20/=20G2=20/=20=EC=B9=B5?= =?UTF-8?q?=ED=85=8C=EC=9D=BC=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 --- ...2 \354\271\265\355\205\214\354\235\274.md" | 139 ++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 "khj20006/202506/22 BOJ G2 \354\271\265\355\205\214\354\235\274.md" diff --git "a/khj20006/202506/22 BOJ G2 \354\271\265\355\205\214\354\235\274.md" "b/khj20006/202506/22 BOJ G2 \354\271\265\355\205\214\354\235\274.md" new file mode 100644 index 00000000..4b78fe4e --- /dev/null +++ "b/khj20006/202506/22 BOJ G2 \354\271\265\355\205\214\354\235\274.md" @@ -0,0 +1,139 @@ +```java +import java.math.BigInteger; +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 long[] A; + static List[] V; + + public static void main(String[] args) throws Exception { + + io = new IOController(); + + init(); + solve(); + + io.close(); + + } + + public static void init() throws Exception { + + N = io.nextInt(); + V = new List[N]; + for(int i=0;i(); + for(int i=1;i