1997 | 2022-12-12 22:25:01 | tronoraa | Mágikus intervallum | python3 | Time limit exceeded 0/100 | 952ms | 24116 KiB |
N = int(input())
sorozat = [int(elem) for elem in input().split(" ")]
L, R = 1, 1
l_sol, r_sol = 0, 0
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(sorozat[l_sol:r_sol]):
r_sol, l_sol = R, L
print(f"{l_sol} {r_sol}")
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 17ms | 11080 KiB | ||||
2 | Time limit exceeded | 865ms | 18200 KiB | ||||
subtask2 | 0/5 | ||||||
3 | Wrong answer | 17ms | 11252 KiB | ||||
4 | Accepted | 17ms | 11664 KiB | ||||
5 | Wrong answer | 17ms | 12136 KiB | ||||
6 | Accepted | 28ms | 12024 KiB | ||||
7 | Accepted | 839ms | 12088 KiB | ||||
8 | Wrong answer | 750ms | 12248 KiB | ||||
subtask3 | 0/10 | ||||||
9 | Wrong answer | 795ms | 12316 KiB | ||||
10 | Wrong answer | 800ms | 12880 KiB | ||||
11 | Wrong answer | 805ms | 12468 KiB | ||||
12 | Accepted | 833ms | 12632 KiB | ||||
13 | Time limit exceeded | 869ms | 5204 KiB | ||||
14 | Time limit exceeded | 887ms | 5456 KiB | ||||
subtask4 | 0/10 | ||||||
15 | Wrong answer | 17ms | 12640 KiB | ||||
16 | Accepted | 27ms | 12760 KiB | ||||
17 | Time limit exceeded | 861ms | 5888 KiB | ||||
18 | Time limit exceeded | 879ms | 7172 KiB | ||||
19 | Time limit exceeded | 870ms | 22628 KiB | ||||
20 | Time limit exceeded | 875ms | 23856 KiB | ||||
21 | Time limit exceeded | 867ms | 23856 KiB | ||||
subtask5 | 0/15 | ||||||
22 | Accepted | 17ms | 13964 KiB | ||||
23 | Time limit exceeded | 865ms | 21448 KiB | ||||
24 | Time limit exceeded | 864ms | 24116 KiB | ||||
subtask6 | 0/60 | ||||||
25 | Time limit exceeded | 948ms | 20888 KiB | ||||
26 | Time limit exceeded | 867ms | 22892 KiB | ||||
27 | Time limit exceeded | 867ms | 23052 KiB | ||||
28 | Time limit exceeded | 875ms | 21068 KiB | ||||
29 | Time limit exceeded | 871ms | 21072 KiB | ||||
30 | Time limit exceeded | 871ms | 21048 KiB | ||||
31 | Time limit exceeded | 931ms | 23180 KiB | ||||
32 | Time limit exceeded | 867ms | 23136 KiB | ||||
33 | Time limit exceeded | 860ms | 22668 KiB | ||||
34 | Time limit exceeded | 884ms | 22864 KiB | ||||
35 | Time limit exceeded | 871ms | 23032 KiB | ||||
36 | Time limit exceeded | 952ms | 23184 KiB | ||||
37 | Time limit exceeded | 864ms | 19408 KiB | ||||
38 | Time limit exceeded | 867ms | 23956 KiB | ||||
39 | Wrong answer | 754ms | 14244 KiB |