11930 | 2024-11-20 16:42:09 | kochv | Pontos Átlag | python3 | Wrong answer 0/100 | 1.095s | 26340 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(str(0))
elif o > sum(P):
print(str(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(str(-i))
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 17ms | 2944 KiB | ||||
2 | Accepted | 16ms | 3020 KiB | ||||
subtask2 | 0/20 | ||||||
3 | Accepted | 16ms | 3128 KiB | ||||
4 | Accepted | 17ms | 3144 KiB | ||||
5 | Accepted | 16ms | 3128 KiB | ||||
6 | Accepted | 16ms | 2988 KiB | ||||
7 | Accepted | 16ms | 2888 KiB | ||||
8 | Accepted | 14ms | 3104 KiB | ||||
9 | Accepted | 16ms | 2976 KiB | ||||
10 | Accepted | 16ms | 3072 KiB | ||||
11 | Accepted | 14ms | 3128 KiB | ||||
12 | Accepted | 14ms | 3116 KiB | ||||
13 | Wrong answer | 16ms | 2992 KiB | ||||
subtask3 | 0/40 | ||||||
14 | Accepted | 17ms | 3208 KiB | ||||
15 | Accepted | 28ms | 3128 KiB | ||||
16 | Accepted | 16ms | 3128 KiB | ||||
17 | Accepted | 18ms | 3312 KiB | ||||
18 | Accepted | 28ms | 3236 KiB | ||||
19 | Accepted | 23ms | 3148 KiB | ||||
20 | Wrong answer | 30ms | 3124 KiB | ||||
21 | Accepted | 16ms | 3252 KiB | ||||
22 | Accepted | 16ms | 2984 KiB | ||||
23 | Accepted | 16ms | 3124 KiB | ||||
24 | Wrong answer | 16ms | 3240 KiB | ||||
25 | Accepted | 16ms | 3132 KiB | ||||
26 | Wrong answer | 14ms | 3148 KiB | ||||
subtask4 | 0/40 | ||||||
27 | Accepted | 153ms | 25048 KiB | ||||
28 | Time limit exceeded | 1.083s | 24888 KiB | ||||
29 | Time limit exceeded | 1.083s | 25160 KiB | ||||
30 | Time limit exceeded | 1.083s | 25048 KiB | ||||
31 | Time limit exceeded | 1.095s | 25052 KiB | ||||
32 | Time limit exceeded | 1.083s | 25048 KiB | ||||
33 | Time limit exceeded | 1.083s | 25052 KiB | ||||
34 | Time limit exceeded | 1.085s | 25108 KiB | ||||
35 | Time limit exceeded | 1.092s | 25048 KiB | ||||
36 | Time limit exceeded | 1.082s | 24876 KiB | ||||
37 | Accepted | 172ms | 25044 KiB | ||||
38 | Accepted | 75ms | 7092 KiB | ||||
39 | Accepted | 156ms | 23760 KiB | ||||
40 | Wrong answer | 148ms | 24996 KiB | ||||
41 | Accepted | 135ms | 17200 KiB | ||||
42 | Wrong answer | 143ms | 26340 KiB | ||||
43 | Wrong answer | 129ms | 23168 KiB |