1988 | 2022-12-12 21:40:52 | tronoraa | Mágikus intervallum | python3 | Runtime error 0/100 | 953ms | 24112 KiB |
N = input()
string = input().split(" ")
sorozat = []
for elem in string:
sorozat.append(int(elem))
lista = []
szam = []
L = 1
for i in range(len(sorozat)):
osszeg = 0
R = i
for j in range(i+1, len(sorozat)):
szam.append(sorozat[i:j])
osszeg = sum(sorozat[i:j])
R = j
L = i+1
m = max(sorozat[i:j])
if m * 2 >= osszeg and len(sorozat) > len(lista):
lista = []
lista.append(L)
lista.append(R)
szam = []
ki = ' '.join(lista)
print(ki)
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Runtime error | 17ms | 11232 KiB | ||||
2 | Time limit exceeded | 901ms | 18568 KiB | ||||
subtask2 | 0/5 | ||||||
3 | Wrong answer | 17ms | 11688 KiB | ||||
4 | Runtime error | 17ms | 11932 KiB | ||||
5 | Runtime error | 17ms | 12140 KiB | ||||
6 | Runtime error | 29ms | 12268 KiB | ||||
7 | Runtime error | 794ms | 12656 KiB | ||||
8 | Runtime error | 842ms | 12756 KiB | ||||
subtask3 | 0/10 | ||||||
9 | Time limit exceeded | 859ms | 5412 KiB | ||||
10 | Time limit exceeded | 892ms | 13284 KiB | ||||
11 | Time limit exceeded | 862ms | 5500 KiB | ||||
12 | Runtime error | 794ms | 13196 KiB | ||||
13 | Time limit exceeded | 926ms | 5604 KiB | ||||
14 | Time limit exceeded | 950ms | 5956 KiB | ||||
subtask4 | 0/10 | ||||||
15 | Wrong answer | 17ms | 13492 KiB | ||||
16 | Runtime error | 28ms | 13424 KiB | ||||
17 | Time limit exceeded | 875ms | 6052 KiB | ||||
18 | Time limit exceeded | 859ms | 7328 KiB | ||||
19 | Time limit exceeded | 860ms | 22548 KiB | ||||
20 | Time limit exceeded | 944ms | 23120 KiB | ||||
21 | Time limit exceeded | 884ms | 23184 KiB | ||||
subtask5 | 0/15 | ||||||
22 | Runtime error | 17ms | 13624 KiB | ||||
23 | Time limit exceeded | 901ms | 21260 KiB | ||||
24 | Time limit exceeded | 953ms | 24012 KiB | ||||
subtask6 | 0/60 | ||||||
25 | Time limit exceeded | 865ms | 21072 KiB | ||||
26 | Time limit exceeded | 880ms | 23184 KiB | ||||
27 | Time limit exceeded | 864ms | 23176 KiB | ||||
28 | Time limit exceeded | 861ms | 21124 KiB | ||||
29 | Time limit exceeded | 871ms | 21100 KiB | ||||
30 | Time limit exceeded | 861ms | 21220 KiB | ||||
31 | Time limit exceeded | 869ms | 23148 KiB | ||||
32 | Time limit exceeded | 856ms | 23276 KiB | ||||
33 | Time limit exceeded | 876ms | 22724 KiB | ||||
34 | Time limit exceeded | 879ms | 22572 KiB | ||||
35 | Time limit exceeded | 948ms | 22764 KiB | ||||
36 | Time limit exceeded | 876ms | 23440 KiB | ||||
37 | Time limit exceeded | 867ms | 19516 KiB | ||||
38 | Time limit exceeded | 888ms | 24112 KiB | ||||
39 | Runtime error | 847ms | 14452 KiB |