SOLUTION INFO
Python · main.py
import sys
def input():
return sys.stdin.readline().rstrip()
N, M, H = map(int, input().split())
students = []
for _ in range(N):
students.append(list(map(int, input().split())))
dp = [1] + [0] * (H+1)
for i in range(N):
for j in range(H, -1, -1):
for k in students[i]:
if j - k >= 0:
dp[j] = (dp[j] + dp[j - k]) % 10007
print(dp[H])
SOLUTION DESCRIPTION
풀이 설명
등록된 풀이 설명이 없습니다.