feat: added alternative python solutions.

This commit is contained in:
2026-05-17 13:20:58 -03:00
parent 7e9caaea6e
commit c85571e157
451 changed files with 3777 additions and 3495 deletions

View File

@@ -0,0 +1,15 @@
n, t = map(int, input().split())
books = list(map(int, input().split()))
dp = [False] * (t + 1)
dp[0] = True
for book in books:
for i in range(t, book - 1, -1):
if dp[i - book]:
dp[i] = True
if dp[t]:
print("PERFEITO!")
else:
print("IMPOSSIVEL!")