Skip to content

Commit a38ce80

Browse files
committed
[BOJ] #11494. 다이나믹이 뭐예요? / 실버 3 / 12분 / 성공
1 parent fe1ee55 commit a38ce80

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import sys
2+
input = sys.stdin.readline
3+
4+
n, m = map(int, input().split())
5+
dp = [[0] * (m+1) for _ in range(n+1)]
6+
dp[0][0] = 1
7+
for i in range(1, n+1):
8+
for j in range(1, m+1):
9+
dp[i][j] = (dp[i][j-1] + dp[i-1][j] + dp[i-1][j-1]) % 1000000007
10+
11+
print(dp[n][m])

0 commit comments

Comments
 (0)