diff --git a/khj20006/202503/21 BOJ G4 Bi-coloring.md b/khj20006/202503/21 BOJ G4 Bi-coloring.md new file mode 100644 index 00000000..ff0af614 --- /dev/null +++ b/khj20006/202503/21 BOJ G4 Bi-coloring.md @@ -0,0 +1,83 @@ +```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, M; + static boolean[][] E; + static int[] C; + + public static void main(String[] args) throws Exception { + for(int T=nextInt();T-->0;) { + + ready(); + solve(); + } + + bwEnd(); + + } + + static void ready() throws Exception{ + + N = nextInt(); + M = nextInt(); + E = new boolean[N][N]; + C = new int[N]; + for(int i=0;i