From 0ec52fa41f0d3b17c9d87652ecb3e0f3318f408f Mon Sep 17 00:00:00 2001 From: oncsr Date: Fri, 7 Mar 2025 16:57:41 +0900 Subject: [PATCH] =?UTF-8?q?[20250307]=20BOJ=20/=20G3=20/=20=ED=99=94?= =?UTF-8?q?=ED=95=99=EC=8B=A4=ED=97=98=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 --- ...24\355\225\231\354\213\244\355\227\230.md" | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 "khj20006/202503/07 BOJ G3 \355\231\224\355\225\231\354\213\244\355\227\230.md" diff --git "a/khj20006/202503/07 BOJ G3 \355\231\224\355\225\231\354\213\244\355\227\230.md" "b/khj20006/202503/07 BOJ G3 \355\231\224\355\225\231\354\213\244\355\227\230.md" new file mode 100644 index 00000000..b37665fe --- /dev/null +++ "b/khj20006/202503/07 BOJ G3 \355\231\224\355\225\231\354\213\244\355\227\230.md" @@ -0,0 +1,74 @@ +```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, M; + static int[] A, B; + + static PriorityQueue Q = new PriorityQueue<>((a,b) -> { + if(a[0] == b[0]) return a[1]-b[1]; + return a[0]-b[0]; + }); + static int[] cnt; + + public static void main(String[] args) throws Exception { + + ready(); + solve(); + + bwEnd(); + + } + + static void ready() throws Exception{ + + N = Integer.parseInt(br.readLine()); + A = new int[N]; + B = new int[N]; + cnt = new int[1001001]; + for(int i=0;i