dp = [[0 for i in range(capacity + 1)] for j in range(n + 1)] for i in range(1, n + 1): ...