11699 | 2024-11-06 15:12:22 | redfoxdelta | Pontos Átlag | python3 | Accepted 100/100 | 206ms | 26340 KiB |
N, K = [int (t) for t in input() .split()]
P = [int (t) for t in input().split ()]
P.sort (reverse = True)
J = sum(P)
if J == N*K :
print (0)
elif J < N*K :
print (1)
else:
Q = J - N*K
i = 0
while Q > 0 :
Q -= (P[i]-1)
i = i+1
print (i)
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 16ms | 3320 KiB | ||||
2 | Accepted | 16ms | 3008 KiB | ||||
subtask2 | 20/20 | ||||||
3 | Accepted | 16ms | 3124 KiB | ||||
4 | Accepted | 16ms | 2952 KiB | ||||
5 | Accepted | 16ms | 3120 KiB | ||||
6 | Accepted | 16ms | 3120 KiB | ||||
7 | Accepted | 16ms | 3180 KiB | ||||
8 | Accepted | 16ms | 3120 KiB | ||||
9 | Accepted | 16ms | 3136 KiB | ||||
10 | Accepted | 16ms | 3124 KiB | ||||
11 | Accepted | 16ms | 3140 KiB | ||||
12 | Accepted | 16ms | 3024 KiB | ||||
13 | Accepted | 16ms | 2908 KiB | ||||
subtask3 | 40/40 | ||||||
14 | Accepted | 16ms | 3148 KiB | ||||
15 | Accepted | 17ms | 3328 KiB | ||||
16 | Accepted | 16ms | 3136 KiB | ||||
17 | Accepted | 16ms | 3128 KiB | ||||
18 | Accepted | 17ms | 3128 KiB | ||||
19 | Accepted | 17ms | 3116 KiB | ||||
20 | Accepted | 17ms | 3276 KiB | ||||
21 | Accepted | 16ms | 3124 KiB | ||||
22 | Accepted | 17ms | 3128 KiB | ||||
23 | Accepted | 16ms | 3128 KiB | ||||
24 | Accepted | 16ms | 3396 KiB | ||||
25 | Accepted | 16ms | 3128 KiB | ||||
26 | Accepted | 16ms | 3048 KiB | ||||
subtask4 | 40/40 | ||||||
27 | Accepted | 168ms | 25036 KiB | ||||
28 | Accepted | 182ms | 24900 KiB | ||||
29 | Accepted | 179ms | 25044 KiB | ||||
30 | Accepted | 168ms | 25036 KiB | ||||
31 | Accepted | 195ms | 24896 KiB | ||||
32 | Accepted | 173ms | 25080 KiB | ||||
33 | Accepted | 206ms | 24884 KiB | ||||
34 | Accepted | 203ms | 25040 KiB | ||||
35 | Accepted | 194ms | 25076 KiB | ||||
36 | Accepted | 149ms | 24984 KiB | ||||
37 | Accepted | 153ms | 25000 KiB | ||||
38 | Accepted | 75ms | 7084 KiB | ||||
39 | Accepted | 149ms | 24572 KiB | ||||
40 | Accepted | 158ms | 24992 KiB | ||||
41 | Accepted | 115ms | 16528 KiB | ||||
42 | Accepted | 153ms | 26340 KiB | ||||
43 | Accepted | 115ms | 23288 KiB |