icpc probs
This commit is contained in:
parent
4c531b965f
commit
69d48861b1
17 changed files with 448 additions and 2 deletions
15
kattis/10-9-2024/1/script.py
Normal file
15
kattis/10-9-2024/1/script.py
Normal 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue