# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
527115 |
2022-02-17T02:11:41 Z |
bebecanvas |
Labels (NOI20_labels) |
Python 3 |
|
821 ms |
42360 KB |
N = int(input())
user2 = input().split()
lst = []
low = 0
change = 0
valid = False
for i in user2:
lst.append(int(i))
if int(i) < 0:
if abs(int(i)) > change:
low = abs(int(i)) - change
change += int(i)
output = [1 + low]
if(output[-1]==N):
valid = True
for i in range(len(lst)):
output.append(lst[i] + output[i])
if output[-1] == N:
valid = True
if output[-1] > N:
valid = False
break
if valid == False:
print('-1')
else:
for i in output:
print(i)
print(' ')
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
13 ms |
2832 KB |
Output is correct |
2 |
Correct |
13 ms |
2872 KB |
Output is correct |
3 |
Correct |
13 ms |
2800 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
13 ms |
2832 KB |
Output is correct |
2 |
Correct |
13 ms |
2872 KB |
Output is correct |
3 |
Correct |
13 ms |
2800 KB |
Output is correct |
4 |
Correct |
13 ms |
2872 KB |
Output is correct |
5 |
Correct |
13 ms |
2836 KB |
Output is correct |
6 |
Correct |
18 ms |
2816 KB |
Output is correct |
7 |
Correct |
13 ms |
2804 KB |
Output is correct |
8 |
Correct |
13 ms |
2764 KB |
Output is correct |
9 |
Correct |
13 ms |
2844 KB |
Output is correct |
10 |
Correct |
12 ms |
2820 KB |
Output is correct |
11 |
Correct |
13 ms |
2828 KB |
Output is correct |
12 |
Correct |
12 ms |
2864 KB |
Output is correct |
13 |
Correct |
13 ms |
2788 KB |
Output is correct |
14 |
Incorrect |
13 ms |
2860 KB |
Output isn't correct |
15 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
13 ms |
2832 KB |
Output is correct |
2 |
Correct |
13 ms |
2872 KB |
Output is correct |
3 |
Correct |
13 ms |
2800 KB |
Output is correct |
4 |
Correct |
13 ms |
2872 KB |
Output is correct |
5 |
Correct |
13 ms |
2836 KB |
Output is correct |
6 |
Correct |
18 ms |
2816 KB |
Output is correct |
7 |
Correct |
13 ms |
2804 KB |
Output is correct |
8 |
Correct |
13 ms |
2764 KB |
Output is correct |
9 |
Correct |
13 ms |
2844 KB |
Output is correct |
10 |
Correct |
12 ms |
2820 KB |
Output is correct |
11 |
Correct |
13 ms |
2828 KB |
Output is correct |
12 |
Correct |
12 ms |
2864 KB |
Output is correct |
13 |
Correct |
13 ms |
2788 KB |
Output is correct |
14 |
Incorrect |
13 ms |
2860 KB |
Output isn't correct |
15 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
578 ms |
23512 KB |
Output is correct |
2 |
Correct |
13 ms |
2764 KB |
Output is correct |
3 |
Correct |
821 ms |
42360 KB |
Output is correct |
4 |
Correct |
386 ms |
11352 KB |
Output is correct |
5 |
Correct |
475 ms |
26768 KB |
Output is correct |
6 |
Correct |
474 ms |
30500 KB |
Output is correct |
7 |
Correct |
359 ms |
20812 KB |
Output is correct |
8 |
Correct |
448 ms |
21132 KB |
Output is correct |
9 |
Correct |
13 ms |
2764 KB |
Output is correct |
10 |
Correct |
18 ms |
2856 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
13 ms |
2832 KB |
Output is correct |
2 |
Correct |
13 ms |
2872 KB |
Output is correct |
3 |
Correct |
13 ms |
2800 KB |
Output is correct |
4 |
Correct |
13 ms |
2872 KB |
Output is correct |
5 |
Correct |
13 ms |
2836 KB |
Output is correct |
6 |
Correct |
18 ms |
2816 KB |
Output is correct |
7 |
Correct |
13 ms |
2804 KB |
Output is correct |
8 |
Correct |
13 ms |
2764 KB |
Output is correct |
9 |
Correct |
13 ms |
2844 KB |
Output is correct |
10 |
Correct |
12 ms |
2820 KB |
Output is correct |
11 |
Correct |
13 ms |
2828 KB |
Output is correct |
12 |
Correct |
12 ms |
2864 KB |
Output is correct |
13 |
Correct |
13 ms |
2788 KB |
Output is correct |
14 |
Incorrect |
13 ms |
2860 KB |
Output isn't correct |
15 |
Halted |
0 ms |
0 KB |
- |