From 4562c0a7d96ffca506d21648f24e232dd6a84ffa Mon Sep 17 00:00:00 2001 From: oncsr Date: Wed, 5 Mar 2025 10:27:07 +0900 Subject: [PATCH] =?UTF-8?q?[20250305]=20BOJ=20/=20P5=20/=20Cards=20Flippin?= =?UTF-8?q?g=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 --- khj20006/202503/05 BOJ P5 Cards Flipping.md | 96 +++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 khj20006/202503/05 BOJ P5 Cards Flipping.md diff --git a/khj20006/202503/05 BOJ P5 Cards Flipping.md b/khj20006/202503/05 BOJ P5 Cards Flipping.md new file mode 100644 index 00000000..d7eabf84 --- /dev/null +++ b/khj20006/202503/05 BOJ P5 Cards Flipping.md @@ -0,0 +1,96 @@ +```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 List[] V; + static int N; + static int[] A, B; + static boolean[] vis; + static int ans = 0, cnt = 0; + static boolean multiedge; + + 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]; + + nextLine(); + for(int i=0;i(); + + for(int i=0;i