85492024-01-21 20:03:08baktucsokA Barbárpython3Runtime error 0/1001.103s170224 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 error17ms11248 KiB
2Runtime error17ms11396 KiB
subtask20/12
3Runtime error17ms11504 KiB
4Runtime error17ms11900 KiB
5Runtime error17ms12128 KiB
6Runtime error17ms12260 KiB
7Runtime error17ms12400 KiB
8Runtime error17ms12372 KiB
9Runtime error17ms12816 KiB
10Runtime error17ms12416 KiB
11Runtime error17ms12536 KiB
12Runtime error17ms12628 KiB
subtask30/28
13Runtime error17ms12612 KiB
14Runtime error18ms12888 KiB
15Runtime error19ms12812 KiB
16Runtime error19ms13196 KiB
17Runtime error19ms13160 KiB
18Runtime error19ms13344 KiB
19Runtime error19ms13300 KiB
20Runtime error19ms13304 KiB
21Runtime error19ms13588 KiB
subtask40/35
22Time limit exceeded1.098s18048 KiB
23Time limit exceeded1.059s18900 KiB
24Time limit exceeded1.072s19876 KiB
25Time limit exceeded1.042s21108 KiB
26Runtime error439ms30688 KiB
27Time limit exceeded1.074s23092 KiB
28Time limit exceeded1.065s23628 KiB
29Time limit exceeded1.07s24156 KiB
30Time limit exceeded1.072s24788 KiB
31Time limit exceeded1.069s25648 KiB
subtask50/25
32Time limit exceeded1.039s134312 KiB
33Time limit exceeded1.057s132840 KiB
34Time limit exceeded1.054s164528 KiB
35Time limit exceeded1.072s145672 KiB
36Time limit exceeded1.072s158392 KiB
37Time limit exceeded1.088s163836 KiB
38Time limit exceeded1.077s167404 KiB
39Time limit exceeded1.074s163820 KiB
40Time limit exceeded1.039s170224 KiB
41Time limit exceeded1.07s162680 KiB
42Time limit exceeded1.067s152628 KiB
43Time limit exceeded1.067s155336 KiB
44Time limit exceeded1.052s162736 KiB
45Time limit exceeded1.07s156440 KiB
46Time limit exceeded1.103s162152 KiB
47Time limit exceeded1.047s156740 KiB
48Time limit exceeded1.08s156876 KiB
49Time limit exceeded1.039s156484 KiB
50Time limit exceeded1.075s156620 KiB