1994 | 2022-12-12 22:10:47 | tronoraa | Mágikus intervallum | python3 | Time limit exceeded 0/100 | 901ms | 24092 KiB |
N = input()
sorozat = [int(elem) for elem in input().split(" ")]
lista = []
szam = []
L, R = 1, 1
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)
print(f"{lista[0]} {lista[1]}")
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 17ms | 11080 KiB | ||||
2 | Time limit exceeded | 901ms | 18340 KiB | ||||
subtask2 | 0/5 | ||||||
3 | Runtime error | 17ms | 11636 KiB | ||||
4 | Wrong answer | 17ms | 11564 KiB | ||||
5 | Wrong answer | 17ms | 12020 KiB | ||||
6 | Wrong answer | 28ms | 12112 KiB | ||||
7 | Wrong answer | 750ms | 12240 KiB | ||||
8 | Wrong answer | 750ms | 12504 KiB | ||||
subtask3 | 0/10 | ||||||
9 | Wrong answer | 791ms | 12508 KiB | ||||
10 | Wrong answer | 799ms | 12704 KiB | ||||
11 | Wrong answer | 800ms | 12708 KiB | ||||
12 | Wrong answer | 750ms | 12572 KiB | ||||
13 | Time limit exceeded | 869ms | 5784 KiB | ||||
14 | Time limit exceeded | 883ms | 5916 KiB | ||||
subtask4 | 0/10 | ||||||
15 | Runtime error | 17ms | 13416 KiB | ||||
16 | Wrong answer | 26ms | 13364 KiB | ||||
17 | Time limit exceeded | 874ms | 6320 KiB | ||||
18 | Time limit exceeded | 879ms | 7252 KiB | ||||
19 | Time limit exceeded | 856ms | 22920 KiB | ||||
20 | Time limit exceeded | 860ms | 23552 KiB | ||||
21 | Time limit exceeded | 879ms | 23672 KiB | ||||
subtask5 | 0/15 | ||||||
22 | Accepted | 17ms | 13840 KiB | ||||
23 | Time limit exceeded | 874ms | 21708 KiB | ||||
24 | Time limit exceeded | 860ms | 23992 KiB | ||||
subtask6 | 0/60 | ||||||
25 | Time limit exceeded | 870ms | 20992 KiB | ||||
26 | Time limit exceeded | 879ms | 23112 KiB | ||||
27 | Time limit exceeded | 860ms | 23068 KiB | ||||
28 | Time limit exceeded | 860ms | 21036 KiB | ||||
29 | Time limit exceeded | 875ms | 21028 KiB | ||||
30 | Time limit exceeded | 879ms | 21128 KiB | ||||
31 | Time limit exceeded | 860ms | 23288 KiB | ||||
32 | Time limit exceeded | 860ms | 23184 KiB | ||||
33 | Time limit exceeded | 867ms | 22532 KiB | ||||
34 | Time limit exceeded | 871ms | 22600 KiB | ||||
35 | Time limit exceeded | 884ms | 22676 KiB | ||||
36 | Time limit exceeded | 864ms | 23176 KiB | ||||
37 | Time limit exceeded | 866ms | 19208 KiB | ||||
38 | Time limit exceeded | 866ms | 24092 KiB | ||||
39 | Wrong answer | 746ms | 14476 KiB |