비트마스킹
![게리맨더링 - 17471번](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FcyelCN%2FbtryzDDTIxX%2FM5N4bgC9OGglYWKu1O3gCk%2Fimg.png)
게리맨더링 - 17471번
내 코드 package com.company; import java.io.*; import java.util.*; public class Main { static int N, answer; static int[][] arr; static int[] p; static boolean[] visited; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = null; N = Integer.parseInt(br.readLine()); p = new int[N + 1]; arr = new in..
![달이 차오른다, 가자. - 1194번](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FcMcmhv%2FbtryamKjNmF%2F0wnfiCzjeksXFiy0CIgv8K%2Fimg.png)
달이 차오른다, 가자. - 1194번
package com.company; import java.io.*; import java.util.*; public class Main { static int[][] d = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}}; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); int N = Integer.parseInt(st.nextToken()); int M = Integer.parseInt(st.nex..