icpc probs

This commit is contained in:
Barrett Ruth 2026-01-07 12:30:51 -06:00
parent 4c531b965f
commit 69d48861b1
17 changed files with 448 additions and 2 deletions

View file

@ -0,0 +1,15 @@
n, a = list(map(int, input().split()))
es = list(map(int, input().split()))
es.sort()
won = 0
for e in es:
if a <= e:
break
won += 1
a -= (e + 1)
print(won)