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