QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#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
Details
Tip: Click on the bar to expand more detailed information
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