From 67af6c37809847f14a2722f0ad658555e9518e4d Mon Sep 17 00:00:00 2001 From: lkhyun <102892446+lkhyun@users.noreply.github.com> Date: Wed, 29 Oct 2025 22:35:22 +0900 Subject: [PATCH] =?UTF-8?q?[20251029]=20PGM=20/=20Lv2=20/=20=ED=94=BC?= =?UTF-8?q?=EB=A1=9C=EB=8F=84=20/=20=EC=9D=B4=EA=B0=95=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...2 \355\224\274\353\241\234\353\217\204.md" | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 "lkhyun/202510/29 PGM Lv2 \355\224\274\353\241\234\353\217\204.md" diff --git "a/lkhyun/202510/29 PGM Lv2 \355\224\274\353\241\234\353\217\204.md" "b/lkhyun/202510/29 PGM Lv2 \355\224\274\353\241\234\353\217\204.md" new file mode 100644 index 00000000..e8759c55 --- /dev/null +++ "b/lkhyun/202510/29 PGM Lv2 \355\224\274\353\241\234\353\217\204.md" @@ -0,0 +1,21 @@ +```java +class Solution { + static int max = 0; + public int solution(int k, int[][] dungeons) { + boolean[] visited = new boolean[dungeons.length]; + backtracking(dungeons, visited, 0, k); + return max; + } + public void backtracking(int[][] dungeons, boolean[] visited, int cnt, int k){ + for(int i = 0; i