1993 | 2022-12-12 22:08:22 | tronoraa | Mágikus intervallum | python3 | Time limit exceeded 0/100 | 953ms | 23856 KiB |
N = input()
string = input().split(" ")
sorozat = [int(elem) for elem in string]
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 | 11352 KiB | ||||
2 | Time limit exceeded | 901ms | 18404 KiB | ||||
subtask2 | 0/5 | ||||||
3 | Runtime error | 17ms | 11928 KiB | ||||
4 | Wrong answer | 17ms | 12276 KiB | ||||
5 | Wrong answer | 17ms | 12228 KiB | ||||
6 | Wrong answer | 28ms | 12284 KiB | ||||
7 | Wrong answer | 753ms | 12644 KiB | ||||
8 | Wrong answer | 744ms | 12760 KiB | ||||
subtask3 | 0/10 | ||||||
9 | Wrong answer | 790ms | 12616 KiB | ||||
10 | Wrong answer | 796ms | 12904 KiB | ||||
11 | Wrong answer | 806ms | 12912 KiB | ||||
12 | Wrong answer | 749ms | 12976 KiB | ||||
13 | Time limit exceeded | 949ms | 6052 KiB | ||||
14 | Time limit exceeded | 935ms | 6016 KiB | ||||
subtask4 | 0/10 | ||||||
15 | Runtime error | 17ms | 13324 KiB | ||||
16 | Wrong answer | 27ms | 13416 KiB | ||||
17 | Time limit exceeded | 865ms | 6032 KiB | ||||
18 | Time limit exceeded | 879ms | 6976 KiB | ||||
19 | Time limit exceeded | 953ms | 22684 KiB | ||||
20 | Time limit exceeded | 867ms | 23220 KiB | ||||
21 | Time limit exceeded | 952ms | 23236 KiB | ||||
subtask5 | 0/15 | ||||||
22 | Accepted | 17ms | 13596 KiB | ||||
23 | Time limit exceeded | 901ms | 21116 KiB | ||||
24 | Time limit exceeded | 860ms | 23596 KiB | ||||
subtask6 | 0/60 | ||||||
25 | Time limit exceeded | 869ms | 20496 KiB | ||||
26 | Time limit exceeded | 879ms | 22672 KiB | ||||
27 | Time limit exceeded | 867ms | 22684 KiB | ||||
28 | Time limit exceeded | 876ms | 20792 KiB | ||||
29 | Time limit exceeded | 864ms | 20744 KiB | ||||
30 | Time limit exceeded | 867ms | 20804 KiB | ||||
31 | Time limit exceeded | 864ms | 22912 KiB | ||||
32 | Time limit exceeded | 871ms | 22720 KiB | ||||
33 | Time limit exceeded | 879ms | 22512 KiB | ||||
34 | Time limit exceeded | 867ms | 22512 KiB | ||||
35 | Time limit exceeded | 864ms | 22432 KiB | ||||
36 | Time limit exceeded | 871ms | 23352 KiB | ||||
37 | Time limit exceeded | 901ms | 19024 KiB | ||||
38 | Time limit exceeded | 869ms | 23856 KiB | ||||
39 | Wrong answer | 750ms | 14244 KiB |