Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Incorrecto
|
0.024 s | 5 KBi |
#2 |
Correcto
|
0.019 s | 3 KBi |
#3 |
Incorrecto
|
0.019 s | 3 KBi |
#4 |
Correcto
|
0.024 s | 3 KBi |
#5 |
Correcto
|
0.029 s | 3 KBi |
#6 |
Correcto
|
0.015 s | 3 KBi |
#7 |
Correcto
|
0.02 s | 3 KBi |
#8 |
Correcto
|
0.021 s | 3 KBi |
#9 |
Correcto
|
0.021 s | 3 KBi |
#10 |
Correcto
|
0.018 s | 3 KBi |
#11 |
Correcto
|
0.023 s | 3 KBi |
#12 |
Incorrecto
|
0.016 s | 3 KBi |
#13 |
Incorrecto
|
0.023 s | 4 KBi |
#14 |
Incorrecto
|
0.449 s | 33 KBi |
#15 |
Correcto
|
0.467 s | 25 KBi |
#16 |
Correcto
|
0.317 s | 30 KBi |
#17 |
Correcto
|
0.511 s | 32 KBi |
#18 |
Correcto
|
0.399 s | 30 KBi |
#19 |
Correcto
|
0.293 s | 30 KBi |
#20 |
Incorrecto
|
0.455 s | 61 KBi |
n = input() n = int(n) array_input = input() array = [int(x) for x in array_input.split()] middle = 0 for i in range(1, n): array[i] = array[i] + array[i-1] for i in range(1, n): if array[i-1] > 0 and (array[n - 1] - array[i - 1]) < 0: middle = i if middle > 0: print(middle) else: print('Impossible')