diff --git "a/khj20006/202602/27 BOJ P3 \353\217\204\354\213\234 \354\231\225\353\263\265\355\225\230\352\270\260 2.md" "b/khj20006/202602/27 BOJ P3 \353\217\204\354\213\234 \354\231\225\353\263\265\355\225\230\352\270\260 2.md" new file mode 100644 index 00000000..406d0b55 --- /dev/null +++ "b/khj20006/202602/27 BOJ P3 \353\217\204\354\213\234 \354\231\225\353\263\265\355\225\230\352\270\260 2.md" @@ -0,0 +1,121 @@ +```java +import java.io.*; +import java.util.*; + +public class Main { + + static class IOManager { + static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); + static BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); + static StringTokenizer st = new StringTokenizer(""); + + private IOManager(){} + + static String nextLine() throws Exception { + String line = br.readLine(); + st = new StringTokenizer(line); + return line; + } + + 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 write(String content) throws Exception { + bw.write(content); + } + + public static void close() throws Exception { + bw.flush(); + bw.close(); + br.close(); + } + } + + // + + static final int INF = (int)1e9 + 7; + + static int N, P; + static int ans = 0; + static int[][] flow, capacity; + static int[] level; + + public static void main(String[] args) throws Exception { + N = IOManager.nextInt(); + P = IOManager.nextInt(); + flow = new int[2*N+1][2*N+1]; + capacity = new int[2*N+1][2*N+1]; + for(int i=3;i<=N;i++) { + capacity[i][i+N] = 1; + } + capacity[1][1+N] = capacity[2][2+N] = INF; + + for(int i=0;i
0);
+ }
+ IOManager.write(ans + "\n");
+
+ IOManager.close();
+ }
+
+ public static boolean bfs(int source, int sink) {
+ level = new int[2*N+1];
+ Queue