QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#683798 | #7933. Build Permutation | vdaysky | WA | 11ms | 10736kb | Python3 | 309b | 2024-10-27 23:55:07 | 2024-10-27 23:55:12 |
Judging History
answer
input()
nums = list(map(int, input().split()))
sorted_nums = sorted(nums)
if sorted_nums != list(range(1, len(sorted_nums) + 1)):
print(-1)
else:
target_sum = sorted_nums[-1] + 1
for x in nums:
print(target_sum - x, end=" ")
print()
if __name__ == '__main__':
pass
详细
Test #1:
score: 0
Wrong Answer
time: 11ms
memory: 10736kb
input:
5 4 2 5 1 3
output:
2 4 1 5 3
result:
wrong answer