1986 | 2022-12-12 21:37:43 | tronoraa | Mágikus intervallum | python3 | Runtime error 0/100 | 948ms | 23924 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 = []
print(lista[0] + " " + lista[1])
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Runtime error | 17ms | 11108 KiB | ||||
2 | Time limit exceeded | 901ms | 18596 KiB | ||||
subtask2 | 0/5 | ||||||
3 | Runtime error | 17ms | 11824 KiB | ||||
4 | Runtime error | 17ms | 12040 KiB | ||||
5 | Runtime error | 17ms | 11992 KiB | ||||
6 | Runtime error | 29ms | 12432 KiB | ||||
7 | Runtime error | 796ms | 12700 KiB | ||||
8 | Runtime error | 839ms | 12892 KiB | ||||
subtask3 | 0/10 | ||||||
9 | Time limit exceeded | 888ms | 13092 KiB | ||||
10 | Time limit exceeded | 864ms | 5524 KiB | ||||
11 | Time limit exceeded | 862ms | 5648 KiB | ||||
12 | Runtime error | 799ms | 13232 KiB | ||||
13 | Time limit exceeded | 883ms | 6000 KiB | ||||
14 | Time limit exceeded | 855ms | 6092 KiB | ||||
subtask4 | 0/10 | ||||||
15 | Runtime error | 17ms | 13696 KiB | ||||
16 | Runtime error | 28ms | 13636 KiB | ||||
17 | Time limit exceeded | 899ms | 6260 KiB | ||||
18 | Time limit exceeded | 875ms | 7260 KiB | ||||
19 | Time limit exceeded | 869ms | 22628 KiB | ||||
20 | Time limit exceeded | 869ms | 23584 KiB | ||||
21 | Time limit exceeded | 873ms | 23684 KiB | ||||
subtask5 | 0/15 | ||||||
22 | Runtime error | 17ms | 13720 KiB | ||||
23 | Time limit exceeded | 901ms | 21240 KiB | ||||
24 | Time limit exceeded | 876ms | 23844 KiB | ||||
subtask6 | 0/60 | ||||||
25 | Time limit exceeded | 860ms | 20972 KiB | ||||
26 | Time limit exceeded | 940ms | 23188 KiB | ||||
27 | Time limit exceeded | 879ms | 23356 KiB | ||||
28 | Time limit exceeded | 873ms | 21236 KiB | ||||
29 | Time limit exceeded | 879ms | 21260 KiB | ||||
30 | Time limit exceeded | 867ms | 21252 KiB | ||||
31 | Time limit exceeded | 873ms | 23296 KiB | ||||
32 | Time limit exceeded | 856ms | 23256 KiB | ||||
33 | Time limit exceeded | 888ms | 22684 KiB | ||||
34 | Time limit exceeded | 948ms | 22724 KiB | ||||
35 | Time limit exceeded | 864ms | 22632 KiB | ||||
36 | Time limit exceeded | 873ms | 23224 KiB | ||||
37 | Time limit exceeded | 861ms | 19264 KiB | ||||
38 | Time limit exceeded | 879ms | 23924 KiB | ||||
39 | Runtime error | 846ms | 14396 KiB |