85192024-01-20 10:47:01baktucsokA Barbárpython3Runtime error 0/1001.098s262884 KiB
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))
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Runtime error18ms11464 KiB
2Runtime error17ms11780 KiB
subtask20/12
3Runtime error17ms11592 KiB
4Runtime error17ms11816 KiB
5Runtime error17ms12152 KiB
6Runtime error17ms12532 KiB
7Runtime error17ms12412 KiB
8Runtime error17ms12528 KiB
9Runtime error17ms12908 KiB
10Runtime error18ms13276 KiB
11Runtime error17ms12852 KiB
12Runtime error17ms12776 KiB
subtask30/28
13Runtime error17ms13152 KiB
14Runtime error18ms13716 KiB
15Runtime error18ms13660 KiB
16Runtime error19ms13984 KiB
17Runtime error18ms14144 KiB
18Runtime error18ms14064 KiB
19Runtime error19ms14060 KiB
20Runtime error19ms14636 KiB
21Runtime error19ms14404 KiB
subtask40/35
22Time limit exceeded1.098s18624 KiB
23Time limit exceeded1.054s19728 KiB
24Time limit exceeded1.075s20596 KiB
25Time limit exceeded1.054s21728 KiB
26Runtime error444ms31704 KiB
27Time limit exceeded1.05s23656 KiB
28Time limit exceeded1.062s24332 KiB
29Time limit exceeded1.055s25072 KiB
30Time limit exceeded1.077s25796 KiB
31Time limit exceeded1.054s26252 KiB
subtask50/25
32Time limit exceeded1.057s135108 KiB
33Time limit exceeded1.052s133680 KiB
34Time limit exceeded1.054s165412 KiB
35Time limit exceeded1.075s154864 KiB
36Time limit exceeded1.059s177512 KiB
37Time limit exceeded1.077s189612 KiB
38Time limit exceeded1.052s199960 KiB
39Time limit exceeded1.054s202940 KiB
40Time limit exceeded1.049s216200 KiB
41Time limit exceeded1.059s221056 KiB
42Time limit exceeded1.052s220084 KiB
43Time limit exceeded1.046s231996 KiB
44Time limit exceeded1.047s250584 KiB
45Time limit exceeded1.042s254036 KiB
46Time limit exceeded1.05s262872 KiB
47Time limit exceeded1.062s262884 KiB
48Time limit exceeded1.046s262868 KiB
49Time limit exceeded1.036s262884 KiB
50Time limit exceeded1.067s262880 KiB