19922022-12-12 21:58:06tronoraaMágikus intervallumpython3Wrong answer 0/100944ms23900 KiB
N = input()
string = input().split(" ")

sorozat = []
for elem in string:
    sorozat.append(int(elem))

lista = []
szam = []
L, R = 1, 1
sol = False
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):
            print(L, "", R)
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Wrong answer17ms11064 KiB
2Time limit exceeded935ms18396 KiB
subtask20/5
3Wrong answer17ms11540 KiB
4Wrong answer17ms11964 KiB
5Wrong answer17ms11996 KiB
6Wrong answer29ms12724 KiB
7Wrong answer827ms12912 KiB
8Wrong answer745ms12928 KiB
subtask30/10
9Wrong answer792ms13272 KiB
10Wrong answer794ms13204 KiB
11Wrong answer801ms13436 KiB
12Wrong answer824ms13644 KiB
13Time limit exceeded859ms5800 KiB
14Time limit exceeded875ms5588 KiB
subtask40/10
15Wrong answer17ms12964 KiB
16Wrong answer28ms13216 KiB
17Time limit exceeded869ms5888 KiB
18Time limit exceeded859ms6924 KiB
19Time limit exceeded879ms22264 KiB
20Time limit exceeded873ms23184 KiB
21Time limit exceeded873ms23192 KiB
subtask50/15
22Wrong answer17ms13168 KiB
23Time limit exceeded865ms21000 KiB
24Time limit exceeded924ms23412 KiB
subtask60/60
25Time limit exceeded865ms20516 KiB
26Time limit exceeded856ms22792 KiB
27Time limit exceeded940ms22608 KiB
28Time limit exceeded873ms21000 KiB
29Time limit exceeded944ms21116 KiB
30Time limit exceeded867ms20796 KiB
31Time limit exceeded867ms22908 KiB
32Time limit exceeded856ms23072 KiB
33Time limit exceeded860ms22520 KiB
34Time limit exceeded876ms22564 KiB
35Time limit exceeded867ms22404 KiB
36Time limit exceeded880ms22924 KiB
37Time limit exceeded888ms19284 KiB
38Time limit exceeded880ms23900 KiB
39Wrong answer749ms14696 KiB