| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 527120 | Honeybee | Labels (NOI20_labels) | Cpython 3 | 797 ms | 41448 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
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)
if N == 2:
if lst[0] == 0:
print('-1')
elif lst[0] == 1:
print('1 2')
else:
print('2 1')
else:
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 |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
