From 16fc1a49f387201b152fcc54e6bedefcfddea3ca Mon Sep 17 00:00:00 2001 From: dk7648 <76927860+dk7648@users.noreply.github.com> Date: Mon, 2 Dec 2024 19:58:27 +0900 Subject: [PATCH] =?UTF-8?q?complete=20[W6]=20=EA=B3=84=EB=9E=80=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EA=B3=84=EB=9E=80=EC=B9=98=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- week6/KBC/boj_16987.java | 57 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 week6/KBC/boj_16987.java diff --git a/week6/KBC/boj_16987.java b/week6/KBC/boj_16987.java new file mode 100644 index 0000000..7349294 --- /dev/null +++ b/week6/KBC/boj_16987.java @@ -0,0 +1,57 @@ +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.util.Arrays; + +public class Main { + static int max; + static int n; + static boolean[] isBroken; + static int[][] eggs; + public static void main(String[] args) throws IOException { + BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); + n = Integer.parseInt(br.readLine()); + max = 0; + eggs = new int[n][2]; + isBroken = new boolean[n]; + for(int i=0; i= n) { + return; + } + if(eggs[index][0] <= 0) { + dfs(index+1, count); + return; + } + + for(int i=0; i