From 8fea8711b6cc0a3423b0d35bea18ac6e197e76f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EC=8B=A0=EC=A7=80?= <101992179+ksinji@users.noreply.github.com> Date: Thu, 30 Oct 2025 23:00:34 +0900 Subject: [PATCH] =?UTF-8?q?[20251030]=20PGM=20/=20LV3=20/=20=EB=93=B1?= =?UTF-8?q?=EA=B5=A3=EA=B8=B8=20/=20=EA=B0=95=EC=8B=A0=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...M \353\223\261\352\265\243\352\270\270.md" | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 "ksinji/202510/30 PGM \353\223\261\352\265\243\352\270\270.md" diff --git "a/ksinji/202510/30 PGM \353\223\261\352\265\243\352\270\270.md" "b/ksinji/202510/30 PGM \353\223\261\352\265\243\352\270\270.md" new file mode 100644 index 00000000..c443d6ac --- /dev/null +++ "b/ksinji/202510/30 PGM \353\223\261\352\265\243\352\270\270.md" @@ -0,0 +1,34 @@ +```java +class Solution { + static final int MOD = 1000000007; + public int solution(int m, int n, int[][] puddles) { + int[][] dp = new int[n+1][m+1]; + + dp[1][1] = 1; + + for (int[] p: puddles){ + dp[p[1]][p[0]] = -1; + } + + for (int i=1; i