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

Envío 672

Problema 0xf2 - Partir un arreglo grande en 2

  • Autor: Andres Ariza
  • Fecha: 2020-09-13 23:45:16 UTC (Hace más de 4 años)
Caso # Resultado Tiempo Memoria
#1
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N =  int(input())
^
main.c:1:6: error: expected expression
N =  int(input())
     ^
main.c:8:10: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
for idx, num in enumerate(sum_accum):
         ^
main.c:8:13: error: expected ';' after top level declarator
for idx, num in enumerate(sum_accum):
            ^
            ;
2 warnings and 2 errors generated.

                    
#2
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N =  int(input())
^
main.c:1:6: error: expected expression
N =  int(input())
     ^
main.c:8:10: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
for idx, num in enumerate(sum_accum):
         ^
main.c:8:13: error: expected ';' after top level declarator
for idx, num in enumerate(sum_accum):
            ^
            ;
2 warnings and 2 errors generated.

                    
#3
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N =  int(input())
^
main.c:1:6: error: expected expression
N =  int(input())
     ^
main.c:8:10: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
for idx, num in enumerate(sum_accum):
         ^
main.c:8:13: error: expected ';' after top level declarator
for idx, num in enumerate(sum_accum):
            ^
            ;
2 warnings and 2 errors generated.

                    
#4
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N =  int(input())
^
main.c:1:6: error: expected expression
N =  int(input())
     ^
main.c:8:10: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
for idx, num in enumerate(sum_accum):
         ^
main.c:8:13: error: expected ';' after top level declarator
for idx, num in enumerate(sum_accum):
            ^
            ;
2 warnings and 2 errors generated.

                    
#5
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N =  int(input())
^
main.c:1:6: error: expected expression
N =  int(input())
     ^
main.c:8:10: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
for idx, num in enumerate(sum_accum):
         ^
main.c:8:13: error: expected ';' after top level declarator
for idx, num in enumerate(sum_accum):
            ^
            ;
2 warnings and 2 errors generated.

                    
#6
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N =  int(input())
^
main.c:1:6: error: expected expression
N =  int(input())
     ^
main.c:8:10: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
for idx, num in enumerate(sum_accum):
         ^
main.c:8:13: error: expected ';' after top level declarator
for idx, num in enumerate(sum_accum):
            ^
            ;
2 warnings and 2 errors generated.

                    
#7
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N =  int(input())
^
main.c:1:6: error: expected expression
N =  int(input())
     ^
main.c:8:10: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
for idx, num in enumerate(sum_accum):
         ^
main.c:8:13: error: expected ';' after top level declarator
for idx, num in enumerate(sum_accum):
            ^
            ;
2 warnings and 2 errors generated.

                    
#8
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N =  int(input())
^
main.c:1:6: error: expected expression
N =  int(input())
     ^
main.c:8:10: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
for idx, num in enumerate(sum_accum):
         ^
main.c:8:13: error: expected ';' after top level declarator
for idx, num in enumerate(sum_accum):
            ^
            ;
2 warnings and 2 errors generated.

                    
#9
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N =  int(input())
^
main.c:1:6: error: expected expression
N =  int(input())
     ^
main.c:8:10: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
for idx, num in enumerate(sum_accum):
         ^
main.c:8:13: error: expected ';' after top level declarator
for idx, num in enumerate(sum_accum):
            ^
            ;
2 warnings and 2 errors generated.

                    
#10
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N =  int(input())
^
main.c:1:6: error: expected expression
N =  int(input())
     ^
main.c:8:10: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
for idx, num in enumerate(sum_accum):
         ^
main.c:8:13: error: expected ';' after top level declarator
for idx, num in enumerate(sum_accum):
            ^
            ;
2 warnings and 2 errors generated.

                    
#11
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N =  int(input())
^
main.c:1:6: error: expected expression
N =  int(input())
     ^
main.c:8:10: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
for idx, num in enumerate(sum_accum):
         ^
main.c:8:13: error: expected ';' after top level declarator
for idx, num in enumerate(sum_accum):
            ^
            ;
2 warnings and 2 errors generated.

                    
#12
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N =  int(input())
^
main.c:1:6: error: expected expression
N =  int(input())
     ^
main.c:8:10: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
for idx, num in enumerate(sum_accum):
         ^
main.c:8:13: error: expected ';' after top level declarator
for idx, num in enumerate(sum_accum):
            ^
            ;
2 warnings and 2 errors generated.

                    
#13
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N =  int(input())
^
main.c:1:6: error: expected expression
N =  int(input())
     ^
main.c:8:10: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
for idx, num in enumerate(sum_accum):
         ^
main.c:8:13: error: expected ';' after top level declarator
for idx, num in enumerate(sum_accum):
            ^
            ;
2 warnings and 2 errors generated.

                    
#14
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N =  int(input())
^
main.c:1:6: error: expected expression
N =  int(input())
     ^
main.c:8:10: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
for idx, num in enumerate(sum_accum):
         ^
main.c:8:13: error: expected ';' after top level declarator
for idx, num in enumerate(sum_accum):
            ^
            ;
2 warnings and 2 errors generated.

                    
#15
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N =  int(input())
^
main.c:1:6: error: expected expression
N =  int(input())
     ^
main.c:8:10: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
for idx, num in enumerate(sum_accum):
         ^
main.c:8:13: error: expected ';' after top level declarator
for idx, num in enumerate(sum_accum):
            ^
            ;
2 warnings and 2 errors generated.

                    
#16
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N =  int(input())
^
main.c:1:6: error: expected expression
N =  int(input())
     ^
main.c:8:10: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
for idx, num in enumerate(sum_accum):
         ^
main.c:8:13: error: expected ';' after top level declarator
for idx, num in enumerate(sum_accum):
            ^
            ;
2 warnings and 2 errors generated.

                    
#17
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N =  int(input())
^
main.c:1:6: error: expected expression
N =  int(input())
     ^
main.c:8:10: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
for idx, num in enumerate(sum_accum):
         ^
main.c:8:13: error: expected ';' after top level declarator
for idx, num in enumerate(sum_accum):
            ^
            ;
2 warnings and 2 errors generated.

                    
#18
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N =  int(input())
^
main.c:1:6: error: expected expression
N =  int(input())
     ^
main.c:8:10: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
for idx, num in enumerate(sum_accum):
         ^
main.c:8:13: error: expected ';' after top level declarator
for idx, num in enumerate(sum_accum):
            ^
            ;
2 warnings and 2 errors generated.

                    
#19
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N =  int(input())
^
main.c:1:6: error: expected expression
N =  int(input())
     ^
main.c:8:10: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
for idx, num in enumerate(sum_accum):
         ^
main.c:8:13: error: expected ';' after top level declarator
for idx, num in enumerate(sum_accum):
            ^
            ;
2 warnings and 2 errors generated.

                    
#20
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N =  int(input())
^
main.c:1:6: error: expected expression
N =  int(input())
     ^
main.c:8:10: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
for idx, num in enumerate(sum_accum):
         ^
main.c:8:13: error: expected ';' after top level declarator
for idx, num in enumerate(sum_accum):
            ^
            ;
2 warnings and 2 errors generated.

                    
Puntos totales: 0 / 100

Código

N =  int(input())
A = [eval(num) for num in input().split()]
sum_left = 0
sum_right = sum(A)
for i in range(N):

    sum_accum[i] = A[i] + sum_accum[i+1]
for idx, num in enumerate(sum_accum):
        if num < 0 and not idx:
            print("Impossible")
            break
        if num < 0:
            print(idx)
            break
else:
    print("Impossible")