1985 | 2022-12-12 21:36:41 | tronoraa | Mágikus intervallum | python3 | Wrong answer 0/100 | 952ms | 23952 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 = []
for elem in lista:
print(elem, end=" ")
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Wrong answer | 18ms | 11224 KiB | ||||
2 | Time limit exceeded | 857ms | 18348 KiB | ||||
subtask2 | 0/5 | ||||||
3 | Wrong answer | 17ms | 11460 KiB | ||||
4 | Wrong answer | 17ms | 11552 KiB | ||||
5 | Wrong answer | 17ms | 11652 KiB | ||||
6 | Wrong answer | 29ms | 12180 KiB | ||||
7 | Wrong answer | 797ms | 12320 KiB | ||||
8 | Wrong answer | 839ms | 12544 KiB | ||||
subtask3 | 0/10 | ||||||
9 | Time limit exceeded | 876ms | 5292 KiB | ||||
10 | Time limit exceeded | 859ms | 5512 KiB | ||||
11 | Time limit exceeded | 859ms | 5664 KiB | ||||
12 | Wrong answer | 794ms | 13232 KiB | ||||
13 | Time limit exceeded | 934ms | 5604 KiB | ||||
14 | Time limit exceeded | 926ms | 5668 KiB | ||||
subtask4 | 0/10 | ||||||
15 | Wrong answer | 17ms | 12904 KiB | ||||
16 | Wrong answer | 29ms | 13304 KiB | ||||
17 | Time limit exceeded | 899ms | 5844 KiB | ||||
18 | Time limit exceeded | 883ms | 7096 KiB | ||||
19 | Time limit exceeded | 888ms | 22640 KiB | ||||
20 | Time limit exceeded | 888ms | 23472 KiB | ||||
21 | Time limit exceeded | 867ms | 23496 KiB | ||||
subtask5 | 0/15 | ||||||
22 | Wrong answer | 17ms | 13496 KiB | ||||
23 | Time limit exceeded | 901ms | 21192 KiB | ||||
24 | Time limit exceeded | 952ms | 23632 KiB | ||||
subtask6 | 0/60 | ||||||
25 | Time limit exceeded | 884ms | 20804 KiB | ||||
26 | Time limit exceeded | 873ms | 22832 KiB | ||||
27 | Time limit exceeded | 884ms | 22708 KiB | ||||
28 | Time limit exceeded | 865ms | 20744 KiB | ||||
29 | Time limit exceeded | 856ms | 20736 KiB | ||||
30 | Time limit exceeded | 869ms | 20608 KiB | ||||
31 | Time limit exceeded | 879ms | 23020 KiB | ||||
32 | Time limit exceeded | 867ms | 23256 KiB | ||||
33 | Time limit exceeded | 856ms | 22720 KiB | ||||
34 | Time limit exceeded | 871ms | 22808 KiB | ||||
35 | Time limit exceeded | 880ms | 22804 KiB | ||||
36 | Time limit exceeded | 856ms | 23500 KiB | ||||
37 | Time limit exceeded | 864ms | 19584 KiB | ||||
38 | Time limit exceeded | 864ms | 23952 KiB | ||||
39 | Wrong answer | 847ms | 14512 KiB |