Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Incorrecto
|
0.021 s | 3 KBi |
#2 |
Incorrecto
|
0.023 s | 3 KBi |
#3 |
Incorrecto
|
0.02 s | 3 KBi |
#4 |
Incorrecto
|
0.021 s | 3 KBi |
#5 |
Incorrecto
|
0.024 s | 3 KBi |
#6 |
Incorrecto
|
0.03 s | 7 KBi |
#7 |
Incorrecto
|
0.022 s | 3 KBi |
#8 |
Incorrecto
|
0.022 s | 3 KBi |
#9 |
Incorrecto
|
0.023 s | 3 KBi |
#10 |
Incorrecto
|
0.023 s | 3 KBi |
#11 |
Incorrecto
|
0.023 s | 3 KBi |
#12 |
Incorrecto
|
0.025 s | 3 KBi |
#13 |
Incorrecto
|
0.026 s | 3 KBi |
#14 |
Incorrecto
|
0.344 s | 33 KBi |
#15 |
Incorrecto
|
0.263 s | 13 KBi |
#16 |
Incorrecto
|
0.316 s | 29 KBi |
#17 |
Incorrecto
|
0.288 s | 29 KBi |
#18 |
Incorrecto
|
0.292 s | 29 KBi |
#19 |
Incorrecto
|
0.292 s | 33 KBi |
#20 |
Incorrecto
|
0.525 s | 61 KBi |
n = input() size =int(n) i=0 j=0 k = 1 sum_total=0 array =size*[0] Slice = 1 root = 0 array_totals_slice =[0,0] number =input() args =number.split() flag ='impossible' for i in range(0,size): array[i] = int(args[i]) sum_total= sum_total + array[i] array_totals_slice[0] = array[0] array_totals_slice[1] = sum_total - array[0] if array_totals_slice[0]< 0 and array_totals_slice[1] > 0: root = 1 flag = int(i) print(root) i=0 if root==0: print(array_totals_slice) for i in range (1,size-1): array_totals_slice[0] = array_totals_slice[0] + array[i] array_totals_slice[1] = array_totals_slice[1] - array[i] print(array_totals_slice) if array_totals_slice[0] < 0 and array_totals_slice[1]> 0: flag = int(i) break print(flag)