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 | 18ms | 11464 KiB | ||||
2 | Runtime error | 17ms | 11780 KiB | ||||
subtask2 | 0/12 | ||||||
3 | Runtime error | 17ms | 11592 KiB | ||||
4 | Runtime error | 17ms | 11816 KiB | ||||
5 | Runtime error | 17ms | 12152 KiB | ||||
6 | Runtime error | 17ms | 12532 KiB | ||||
7 | Runtime error | 17ms | 12412 KiB | ||||
8 | Runtime error | 17ms | 12528 KiB | ||||
9 | Runtime error | 17ms | 12908 KiB | ||||
10 | Runtime error | 18ms | 13276 KiB | ||||
11 | Runtime error | 17ms | 12852 KiB | ||||
12 | Runtime error | 17ms | 12776 KiB | ||||
subtask3 | 0/28 | ||||||
13 | Runtime error | 17ms | 13152 KiB | ||||
14 | Runtime error | 18ms | 13716 KiB | ||||
15 | Runtime error | 18ms | 13660 KiB | ||||
16 | Runtime error | 19ms | 13984 KiB | ||||
17 | Runtime error | 18ms | 14144 KiB | ||||
18 | Runtime error | 18ms | 14064 KiB | ||||
19 | Runtime error | 19ms | 14060 KiB | ||||
20 | Runtime error | 19ms | 14636 KiB | ||||
21 | Runtime error | 19ms | 14404 KiB | ||||
subtask4 | 0/35 | ||||||
22 | Time limit exceeded | 1.098s | 18624 KiB | ||||
23 | Time limit exceeded | 1.054s | 19728 KiB | ||||
24 | Time limit exceeded | 1.075s | 20596 KiB | ||||
25 | Time limit exceeded | 1.054s | 21728 KiB | ||||
26 | Runtime error | 444ms | 31704 KiB | ||||
27 | Time limit exceeded | 1.05s | 23656 KiB | ||||
28 | Time limit exceeded | 1.062s | 24332 KiB | ||||
29 | Time limit exceeded | 1.055s | 25072 KiB | ||||
30 | Time limit exceeded | 1.077s | 25796 KiB | ||||
31 | Time limit exceeded | 1.054s | 26252 KiB | ||||
subtask5 | 0/25 | ||||||
32 | Time limit exceeded | 1.057s | 135108 KiB | ||||
33 | Time limit exceeded | 1.052s | 133680 KiB | ||||
34 | Time limit exceeded | 1.054s | 165412 KiB | ||||
35 | Time limit exceeded | 1.075s | 154864 KiB | ||||
36 | Time limit exceeded | 1.059s | 177512 KiB | ||||
37 | Time limit exceeded | 1.077s | 189612 KiB | ||||
38 | Time limit exceeded | 1.052s | 199960 KiB | ||||
39 | Time limit exceeded | 1.054s | 202940 KiB | ||||
40 | Time limit exceeded | 1.049s | 216200 KiB | ||||
41 | Time limit exceeded | 1.059s | 221056 KiB | ||||
42 | Time limit exceeded | 1.052s | 220084 KiB | ||||
43 | Time limit exceeded | 1.046s | 231996 KiB | ||||
44 | Time limit exceeded | 1.047s | 250584 KiB | ||||
45 | Time limit exceeded | 1.042s | 254036 KiB | ||||
46 | Time limit exceeded | 1.05s | 262872 KiB | ||||
47 | Time limit exceeded | 1.062s | 262884 KiB | ||||
48 | Time limit exceeded | 1.046s | 262868 KiB | ||||
49 | Time limit exceeded | 1.036s | 262884 KiB | ||||
50 | Time limit exceeded | 1.067s | 262880 KiB |