From f24ecee2bd6fb0af42abd25878c362cbbdba14cb Mon Sep 17 00:00:00 2001 From: oncsr Date: Thu, 27 Mar 2025 10:05:16 +0900 Subject: [PATCH] =?UTF-8?q?[20250327]=20BOJ=20/=20G3=20/=20Fix=20Wiring=20?= =?UTF-8?q?/=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 --- khj20006/202503/27 BOJ G3 Fix Wiring.md | 68 +++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 khj20006/202503/27 BOJ G3 Fix Wiring.md diff --git a/khj20006/202503/27 BOJ G3 Fix Wiring.md b/khj20006/202503/27 BOJ G3 Fix Wiring.md new file mode 100644 index 00000000..de2a3d4c --- /dev/null +++ b/khj20006/202503/27 BOJ G3 Fix Wiring.md @@ -0,0 +1,68 @@ +```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 = new StringTokenizer(""); + + static void nextLine() throws Exception {st = new StringTokenizer(br.readLine());} + static String nextToken() throws Exception { + while(!st.hasMoreTokens()) nextLine(); + return st.nextToken(); + } + static int nextInt() throws Exception { return Integer.parseInt(nextToken()); } + static long nextLong() throws Exception { return Long.parseLong(nextToken()); } + static double nextDouble() throws Exception { return Double.parseDouble(nextToken()); } + static void bwEnd() throws Exception {bw.flush();bw.close();} + + // Additional field + + static int N; + static long[] A; + + public static void main(String[] args) throws Exception { + + ready(); + solve(); + + bwEnd(); + + } + + static void ready() throws Exception{ + + N = nextInt(); + A = new long[N*(N-1)/2]; + for(int i=0;i