diff --git "a/khj20006/202512/19 BOJ P5 \353\240\210\353\252\254\354\273\265 \354\266\234\354\240\234\355\225\230\352\270\260.md" "b/khj20006/202512/19 BOJ P5 \353\240\210\353\252\254\354\273\265 \354\266\234\354\240\234\355\225\230\352\270\260.md" new file mode 100644 index 00000000..e533f19b --- /dev/null +++ "b/khj20006/202512/19 BOJ P5 \353\240\210\353\252\254\354\273\265 \354\266\234\354\240\234\355\225\230\352\270\260.md" @@ -0,0 +1,70 @@ +```java +import java.sql.Array; +import java.util.*; +import java.io.*; + +public class Main { + + static BufferedReader br; + static BufferedWriter bw; + static StringTokenizer st; + + static int N, K; + static String[] arr; + static boolean[] exist; + + public static void main(String[] args) throws Exception { + + input(); + solve(); + + } + + public static void input() throws Exception { + br = new BufferedReader(new InputStreamReader(System.in)); + + st = new StringTokenizer(br.readLine()); + N = Integer.parseInt(st.nextToken()); + K = Integer.parseInt(st.nextToken()); + arr = new String[N]; + exist = new boolean[1<=0;j--) rev += arr[i].charAt(j); + arr[i] = rev; + } + int a = Integer.parseInt(arr[i], 2); + if(exist[a]) { + bw.write("WellKnown\n"); + Z = 0; + } + else { + bw.write("AdHoc\n"); + Z = 1; + } + bck(a); + } + + bw.close(); + } + + public static void bck(int a) { + if(exist[a]) return; + exist[a] = true; + for(int i=0;i