N = int(input().strip())
D = list(map(int, input().strip().split()))
l = []
z=D
for i in range(N):
D=z
while True:
if i ==0:
l.append(str(N-1))
break
elif i == len(D)-1:
l.append("0")
break
else:
if D[i+1]-D[i]>=D[i]-D[i-1]:
D.remove(D[i])
i-=1
else:
D.remove(D[i])
print(" ".join(l))
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Runtime error | 17ms | 11248 KiB | ||||
2 | Runtime error | 17ms | 11396 KiB | ||||
subtask2 | 0/12 | ||||||
3 | Runtime error | 17ms | 11504 KiB | ||||
4 | Runtime error | 17ms | 11900 KiB | ||||
5 | Runtime error | 17ms | 12128 KiB | ||||
6 | Runtime error | 17ms | 12260 KiB | ||||
7 | Runtime error | 17ms | 12400 KiB | ||||
8 | Runtime error | 17ms | 12372 KiB | ||||
9 | Runtime error | 17ms | 12816 KiB | ||||
10 | Runtime error | 17ms | 12416 KiB | ||||
11 | Runtime error | 17ms | 12536 KiB | ||||
12 | Runtime error | 17ms | 12628 KiB | ||||
subtask3 | 0/28 | ||||||
13 | Runtime error | 17ms | 12612 KiB | ||||
14 | Runtime error | 18ms | 12888 KiB | ||||
15 | Runtime error | 19ms | 12812 KiB | ||||
16 | Runtime error | 19ms | 13196 KiB | ||||
17 | Runtime error | 19ms | 13160 KiB | ||||
18 | Runtime error | 19ms | 13344 KiB | ||||
19 | Runtime error | 19ms | 13300 KiB | ||||
20 | Runtime error | 19ms | 13304 KiB | ||||
21 | Runtime error | 19ms | 13588 KiB | ||||
subtask4 | 0/35 | ||||||
22 | Time limit exceeded | 1.098s | 18048 KiB | ||||
23 | Time limit exceeded | 1.059s | 18900 KiB | ||||
24 | Time limit exceeded | 1.072s | 19876 KiB | ||||
25 | Time limit exceeded | 1.042s | 21108 KiB | ||||
26 | Runtime error | 439ms | 30688 KiB | ||||
27 | Time limit exceeded | 1.074s | 23092 KiB | ||||
28 | Time limit exceeded | 1.065s | 23628 KiB | ||||
29 | Time limit exceeded | 1.07s | 24156 KiB | ||||
30 | Time limit exceeded | 1.072s | 24788 KiB | ||||
31 | Time limit exceeded | 1.069s | 25648 KiB | ||||
subtask5 | 0/25 | ||||||
32 | Time limit exceeded | 1.039s | 134312 KiB | ||||
33 | Time limit exceeded | 1.057s | 132840 KiB | ||||
34 | Time limit exceeded | 1.054s | 164528 KiB | ||||
35 | Time limit exceeded | 1.072s | 145672 KiB | ||||
36 | Time limit exceeded | 1.072s | 158392 KiB | ||||
37 | Time limit exceeded | 1.088s | 163836 KiB | ||||
38 | Time limit exceeded | 1.077s | 167404 KiB | ||||
39 | Time limit exceeded | 1.074s | 163820 KiB | ||||
40 | Time limit exceeded | 1.039s | 170224 KiB | ||||
41 | Time limit exceeded | 1.07s | 162680 KiB | ||||
42 | Time limit exceeded | 1.067s | 152628 KiB | ||||
43 | Time limit exceeded | 1.067s | 155336 KiB | ||||
44 | Time limit exceeded | 1.052s | 162736 KiB | ||||
45 | Time limit exceeded | 1.07s | 156440 KiB | ||||
46 | Time limit exceeded | 1.103s | 162152 KiB | ||||
47 | Time limit exceeded | 1.047s | 156740 KiB | ||||
48 | Time limit exceeded | 1.08s | 156876 KiB | ||||
49 | Time limit exceeded | 1.039s | 156484 KiB | ||||
50 | Time limit exceeded | 1.075s | 156620 KiB |