1987 | 2022-12-12 21:38:57 | tronoraa | Mágikus intervallum | python3 | Runtime error 0/100 | 953ms | 24196 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 = []
print(''.join(lista))
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Runtime error | 17ms | 11320 KiB | ||||
2 | Time limit exceeded | 901ms | 18572 KiB | ||||
subtask2 | 0/5 | ||||||
3 | Wrong answer | 17ms | 11572 KiB | ||||
4 | Runtime error | 17ms | 11956 KiB | ||||
5 | Runtime error | 17ms | 12256 KiB | ||||
6 | Runtime error | 29ms | 12364 KiB | ||||
7 | Runtime error | 800ms | 12716 KiB | ||||
8 | Time limit exceeded | 853ms | 12804 KiB | ||||
subtask3 | 0/10 | ||||||
9 | Time limit exceeded | 875ms | 5396 KiB | ||||
10 | Time limit exceeded | 866ms | 5596 KiB | ||||
11 | Time limit exceeded | 875ms | 5960 KiB | ||||
12 | Runtime error | 814ms | 13244 KiB | ||||
13 | Time limit exceeded | 862ms | 5920 KiB | ||||
14 | Time limit exceeded | 887ms | 6036 KiB | ||||
subtask4 | 0/10 | ||||||
15 | Wrong answer | 17ms | 13724 KiB | ||||
16 | Runtime error | 28ms | 13444 KiB | ||||
17 | Time limit exceeded | 899ms | 6136 KiB | ||||
18 | Time limit exceeded | 856ms | 7228 KiB | ||||
19 | Time limit exceeded | 876ms | 22788 KiB | ||||
20 | Time limit exceeded | 861ms | 23344 KiB | ||||
21 | Time limit exceeded | 876ms | 23476 KiB | ||||
subtask5 | 0/15 | ||||||
22 | Runtime error | 17ms | 13680 KiB | ||||
23 | Time limit exceeded | 861ms | 21468 KiB | ||||
24 | Time limit exceeded | 865ms | 23768 KiB | ||||
subtask6 | 0/60 | ||||||
25 | Time limit exceeded | 879ms | 20864 KiB | ||||
26 | Time limit exceeded | 876ms | 23028 KiB | ||||
27 | Time limit exceeded | 873ms | 23052 KiB | ||||
28 | Time limit exceeded | 949ms | 21012 KiB | ||||
29 | Time limit exceeded | 861ms | 20964 KiB | ||||
30 | Time limit exceeded | 871ms | 20964 KiB | ||||
31 | Time limit exceeded | 953ms | 23156 KiB | ||||
32 | Time limit exceeded | 865ms | 23060 KiB | ||||
33 | Time limit exceeded | 875ms | 22484 KiB | ||||
34 | Time limit exceeded | 867ms | 22576 KiB | ||||
35 | Time limit exceeded | 873ms | 22624 KiB | ||||
36 | Time limit exceeded | 888ms | 23272 KiB | ||||
37 | Time limit exceeded | 888ms | 19608 KiB | ||||
38 | Time limit exceeded | 944ms | 24196 KiB | ||||
39 | Time limit exceeded | 859ms | 6840 KiB |