Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 File "script.py", line 2 arr = map(int input().split(' ')) ^ SyntaxError: invalid syntax |
0.032 s | 3 KBi |
#2 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 File "script.py", line 2 arr = map(int input().split(' ')) ^ SyntaxError: invalid syntax |
0.033 s | 3 KBi |
#3 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 File "script.py", line 2 arr = map(int input().split(' ')) ^ SyntaxError: invalid syntax |
0.03 s | 5 KBi |
#4 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 File "script.py", line 2 arr = map(int input().split(' ')) ^ SyntaxError: invalid syntax |
0.029 s | 3 KBi |
#5 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 File "script.py", line 2 arr = map(int input().split(' ')) ^ SyntaxError: invalid syntax |
0.025 s | 3 KBi |
#6 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 File "script.py", line 2 arr = map(int input().split(' ')) ^ SyntaxError: invalid syntax |
0.023 s | 3 KBi |
#7 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 File "script.py", line 2 arr = map(int input().split(' ')) ^ SyntaxError: invalid syntax |
0.027 s | 3 KBi |
#8 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 File "script.py", line 2 arr = map(int input().split(' ')) ^ SyntaxError: invalid syntax |
0.027 s | 3 KBi |
#9 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 File "script.py", line 2 arr = map(int input().split(' ')) ^ SyntaxError: invalid syntax |
0.028 s | 5 KBi |
#10 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 File "script.py", line 2 arr = map(int input().split(' ')) ^ SyntaxError: invalid syntax |
0.032 s | 3 KBi |
#11 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 File "script.py", line 2 arr = map(int input().split(' ')) ^ SyntaxError: invalid syntax |
0.031 s | 3 KBi |
#12 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 File "script.py", line 2 arr = map(int input().split(' ')) ^ SyntaxError: invalid syntax |
0.025 s | 3 KBi |
#13 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 File "script.py", line 2 arr = map(int input().split(' ')) ^ SyntaxError: invalid syntax |
0.024 s | 3 KBi |
#14 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 File "script.py", line 2 arr = map(int input().split(' ')) ^ SyntaxError: invalid syntax |
0.026 s | 3 KBi |
#15 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 File "script.py", line 2 arr = map(int input().split(' ')) ^ SyntaxError: invalid syntax |
0.024 s | 3 KBi |
#16 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 File "script.py", line 2 arr = map(int input().split(' ')) ^ SyntaxError: invalid syntax |
0.023 s | 3 KBi |
#17 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 File "script.py", line 2 arr = map(int input().split(' ')) ^ SyntaxError: invalid syntax |
0.028 s | 3 KBi |
#18 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 File "script.py", line 2 arr = map(int input().split(' ')) ^ SyntaxError: invalid syntax |
0.031 s | 3 KBi |
#19 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 File "script.py", line 2 arr = map(int input().split(' ')) ^ SyntaxError: invalid syntax |
0.023 s | 3 KBi |
#20 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 File "script.py", line 2 arr = map(int input().split(' ')) ^ SyntaxError: invalid syntax |
0.025 s | 3 KBi |
n_arr = int(input()) arr = map(int input().split(' ')) sums = [0]*(n_arr+1) positive_idxs = [] for n, p in enumerate(arr): psum = sums[n] + p sums[n+1] = psum # Narrow down to possible solutions for the left side if psum > 0: positive_idxs.append(n) if len(positive_idxs) > 0: S = sums[-1] # total sum for s_gt_zero_idx in positive_idxs: s_complement = S - sums[s_gt_zero_idx] if s_complement < 0: print(s_gt_zero_idx) break else: print('Impossible') else: print('Impossible')