19942022-12-12 22:10:47tronoraaMágikus intervallumpython3Time limit exceeded 0/100901ms24092 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]}")
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted17ms11080 KiB
2Time limit exceeded901ms18340 KiB
subtask20/5
3Runtime error17ms11636 KiB
4Wrong answer17ms11564 KiB
5Wrong answer17ms12020 KiB
6Wrong answer28ms12112 KiB
7Wrong answer750ms12240 KiB
8Wrong answer750ms12504 KiB
subtask30/10
9Wrong answer791ms12508 KiB
10Wrong answer799ms12704 KiB
11Wrong answer800ms12708 KiB
12Wrong answer750ms12572 KiB
13Time limit exceeded869ms5784 KiB
14Time limit exceeded883ms5916 KiB
subtask40/10
15Runtime error17ms13416 KiB
16Wrong answer26ms13364 KiB
17Time limit exceeded874ms6320 KiB
18Time limit exceeded879ms7252 KiB
19Time limit exceeded856ms22920 KiB
20Time limit exceeded860ms23552 KiB
21Time limit exceeded879ms23672 KiB
subtask50/15
22Accepted17ms13840 KiB
23Time limit exceeded874ms21708 KiB
24Time limit exceeded860ms23992 KiB
subtask60/60
25Time limit exceeded870ms20992 KiB
26Time limit exceeded879ms23112 KiB
27Time limit exceeded860ms23068 KiB
28Time limit exceeded860ms21036 KiB
29Time limit exceeded875ms21028 KiB
30Time limit exceeded879ms21128 KiB
31Time limit exceeded860ms23288 KiB
32Time limit exceeded860ms23184 KiB
33Time limit exceeded867ms22532 KiB
34Time limit exceeded871ms22600 KiB
35Time limit exceeded884ms22676 KiB
36Time limit exceeded864ms23176 KiB
37Time limit exceeded866ms19208 KiB
38Time limit exceeded866ms24092 KiB
39Wrong answer746ms14476 KiB