11928 | 2024-11-20 16:24:59 | kochv | Pontos Átlag | python3 | Wrong answer 0/100 | 1.1s | 26264 KiB |
N,K = map(int,input().strip().split())
P = list(map(int,input().strip().split()))
o = K*len(P)
P.sort()
if o == sum(P):
print(0)
elif o > sum(P):
print(1)
else:
i = -1
while o != sum(P):
if P[i]> sum(P)-o +1:
P[i] -= (sum(P) - o)
else:
P[i] = 1
i -=1
print(-i)
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 16ms | 3320 KiB | ||||
2 | Accepted | 16ms | 3124 KiB | ||||
subtask2 | 0/20 | ||||||
3 | Accepted | 16ms | 3128 KiB | ||||
4 | Accepted | 16ms | 3120 KiB | ||||
5 | Accepted | 16ms | 2916 KiB | ||||
6 | Accepted | 14ms | 3128 KiB | ||||
7 | Accepted | 17ms | 3128 KiB | ||||
8 | Accepted | 14ms | 3140 KiB | ||||
9 | Accepted | 16ms | 3128 KiB | ||||
10 | Accepted | 16ms | 3132 KiB | ||||
11 | Accepted | 17ms | 3124 KiB | ||||
12 | Accepted | 17ms | 3132 KiB | ||||
13 | Wrong answer | 16ms | 3128 KiB | ||||
subtask3 | 0/40 | ||||||
14 | Accepted | 17ms | 3124 KiB | ||||
15 | Accepted | 28ms | 3128 KiB | ||||
16 | Accepted | 17ms | 3464 KiB | ||||
17 | Accepted | 19ms | 3236 KiB | ||||
18 | Accepted | 28ms | 3124 KiB | ||||
19 | Accepted | 23ms | 3312 KiB | ||||
20 | Wrong answer | 29ms | 3124 KiB | ||||
21 | Accepted | 16ms | 3128 KiB | ||||
22 | Accepted | 16ms | 3124 KiB | ||||
23 | Accepted | 16ms | 2964 KiB | ||||
24 | Wrong answer | 16ms | 3128 KiB | ||||
25 | Accepted | 14ms | 3128 KiB | ||||
26 | Wrong answer | 16ms | 3128 KiB | ||||
subtask4 | 0/40 | ||||||
27 | Accepted | 171ms | 24944 KiB | ||||
28 | Time limit exceeded | 1.1s | 24872 KiB | ||||
29 | Time limit exceeded | 1.1s | 24952 KiB | ||||
30 | Time limit exceeded | 1.1s | 25052 KiB | ||||
31 | Time limit exceeded | 1.09s | 25052 KiB | ||||
32 | Time limit exceeded | 1.072s | 25056 KiB | ||||
33 | Time limit exceeded | 1.072s | 24900 KiB | ||||
34 | Time limit exceeded | 1.072s | 25068 KiB | ||||
35 | Time limit exceeded | 1.085s | 24948 KiB | ||||
36 | Time limit exceeded | 1.083s | 24904 KiB | ||||
37 | Accepted | 177ms | 25052 KiB | ||||
38 | Accepted | 76ms | 7088 KiB | ||||
39 | Accepted | 158ms | 23888 KiB | ||||
40 | Wrong answer | 149ms | 24864 KiB | ||||
41 | Accepted | 138ms | 17204 KiB | ||||
42 | Wrong answer | 148ms | 26264 KiB | ||||
43 | Wrong answer | 130ms | 23316 KiB |