1990 | 2022-12-12 21:55:06 | tronoraa | Mágikus intervallum | python3 | Time limit exceeded 0/100 | 939ms | 24444 KiB |
N = input()
string = input().split(" ")
sorozat = []
for elem in string:
sorozat.append(int(elem))
lista = []
szam = []
L, R = 1, 1
sol = False
for i in range(len(sorozat)):
osszeg = 0
for j in range(i+1, len(sorozat)):
osszeg = sum(sorozat[i:j])
R, L = j, i+1
m = max(sorozat[i:j])
if m * 2 >= osszeg and len(sorozat[i:j]) > len(lista):
lista = []
lista.append(L)
lista.append(R)
sol = True
if sol:
break
for i in range(len(lista)):
if i == len(lista)-1:
print(lista[i])
else:
print(lista[i], end=' ')
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 18ms | 11256 KiB | ||||
2 | Time limit exceeded | 862ms | 18336 KiB | ||||
subtask2 | 0/5 | ||||||
3 | Wrong answer | 17ms | 11588 KiB | ||||
4 | Wrong answer | 17ms | 11856 KiB | ||||
5 | Accepted | 17ms | 11980 KiB | ||||
6 | Accepted | 17ms | 12112 KiB | ||||
7 | Wrong answer | 20ms | 12304 KiB | ||||
8 | Wrong answer | 20ms | 12552 KiB | ||||
subtask3 | 0/10 | ||||||
9 | Wrong answer | 20ms | 12664 KiB | ||||
10 | Wrong answer | 20ms | 12776 KiB | ||||
11 | Wrong answer | 20ms | 12988 KiB | ||||
12 | Wrong answer | 20ms | 13272 KiB | ||||
13 | Wrong answer | 32ms | 13328 KiB | ||||
14 | Wrong answer | 32ms | 13748 KiB | ||||
subtask4 | 0/10 | ||||||
15 | Wrong answer | 17ms | 13204 KiB | ||||
16 | Wrong answer | 17ms | 13448 KiB | ||||
17 | Wrong answer | 35ms | 13832 KiB | ||||
18 | Time limit exceeded | 865ms | 7424 KiB | ||||
19 | Time limit exceeded | 856ms | 23104 KiB | ||||
20 | Time limit exceeded | 864ms | 24076 KiB | ||||
21 | Time limit exceeded | 939ms | 23996 KiB | ||||
subtask5 | 0/15 | ||||||
22 | Accepted | 17ms | 14052 KiB | ||||
23 | Time limit exceeded | 901ms | 21760 KiB | ||||
24 | Time limit exceeded | 880ms | 24444 KiB | ||||
subtask6 | 0/60 | ||||||
25 | Time limit exceeded | 856ms | 21224 KiB | ||||
26 | Time limit exceeded | 869ms | 23396 KiB | ||||
27 | Time limit exceeded | 888ms | 23692 KiB | ||||
28 | Time limit exceeded | 888ms | 21704 KiB | ||||
29 | Time limit exceeded | 856ms | 21852 KiB | ||||
30 | Time limit exceeded | 856ms | 21680 KiB | ||||
31 | Time limit exceeded | 875ms | 23648 KiB | ||||
32 | Time limit exceeded | 856ms | 23532 KiB | ||||
33 | Time limit exceeded | 884ms | 23100 KiB | ||||
34 | Time limit exceeded | 867ms | 23068 KiB | ||||
35 | Time limit exceeded | 869ms | 23124 KiB | ||||
36 | Time limit exceeded | 888ms | 23828 KiB | ||||
37 | Time limit exceeded | 875ms | 20248 KiB | ||||
38 | Time limit exceeded | 864ms | 24296 KiB | ||||
39 | Wrong answer | 21ms | 14780 KiB |