█████████ ████ ███░░░░░███ ░░███ ███ ░░░ ██████ ███████ ██████ ██████ ░███ ███░░███ ███░░███ ███░░███ ███░░███ ░███ ░███ ░███░███ ░███ ░███████ ░███ ░███ ░░███ ███░███ ░███░███ ░███ ░███░░░ ░███ ░███ ░░█████████ ░░██████ ░░████████░░██████ ░░██████ ░░░░░░░░░ ░░░░░░ ░░░░░░░░ ░░░░░░ ░░░░░░

Envío 1053

Problema 0xf2 - Partir un arreglo grande en 2

  • Autor: alorozco77
  • Fecha: 2020-10-09 14:41:00 UTC (Hace más de 3 años)
Caso # Resultado Tiempo Memoria
#1
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 1
    n = input()
    ^
IndentationError: unexpected indent
0.025 s 3 KBi
#2
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 1
    n = input()
    ^
IndentationError: unexpected indent
0.028 s 3 KBi
#3
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 1
    n = input()
    ^
IndentationError: unexpected indent
0.025 s 3 KBi
#4
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 1
    n = input()
    ^
IndentationError: unexpected indent
0.029 s 4 KBi
#5
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 1
    n = input()
    ^
IndentationError: unexpected indent
0.021 s 3 KBi
#6
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 1
    n = input()
    ^
IndentationError: unexpected indent
0.024 s 3 KBi
#7
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 1
    n = input()
    ^
IndentationError: unexpected indent
0.027 s 3 KBi
#8
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 1
    n = input()
    ^
IndentationError: unexpected indent
0.024 s 3 KBi
#9
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 1
    n = input()
    ^
IndentationError: unexpected indent
0.024 s 3 KBi
#10
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 1
    n = input()
    ^
IndentationError: unexpected indent
0.026 s 3 KBi
#11
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 1
    n = input()
    ^
IndentationError: unexpected indent
0.025 s 3 KBi
#12
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 1
    n = input()
    ^
IndentationError: unexpected indent
0.024 s 3 KBi
#13
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 1
    n = input()
    ^
IndentationError: unexpected indent
0.022 s 3 KBi
#14
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 1
    n = input()
    ^
IndentationError: unexpected indent
0.022 s 3 KBi
#15
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 1
    n = input()
    ^
IndentationError: unexpected indent
0.022 s 3 KBi
#16
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 1
    n = input()
    ^
IndentationError: unexpected indent
0.025 s 3 KBi
#17
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 1
    n = input()
    ^
IndentationError: unexpected indent
0.02 s 3 KBi
#18
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 1
    n = input()
    ^
IndentationError: unexpected indent
0.022 s 3 KBi
#19
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 1
    n = input()
    ^
IndentationError: unexpected indent
0.022 s 3 KBi
#20
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 1
    n = input()
    ^
IndentationError: unexpected indent
0.023 s 3 KBi
Puntos totales: 0 / 100

Código

   n = input()
size =int(n)
i=0
sum_total=0
array =size*[0]
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]
i=0

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+1)

i=0
if root==0:
    print(array_totals_slice)    
    for i in range (1,(size)):
        array_totals_slice[0] = array_totals_slice[0] + array[i]
        array_totals_slice[1] = array_totals_slice[1] - array[i]
        
        if array_totals_slice[0] > 0 and array_totals_slice[1] < 0:
         flag = int(i+1)
         break
print(flag)