QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#683798#7933. Build PermutationvdayskyWA 11ms10736kbPython3309b2024-10-27 23:55:072024-10-27 23:55:12

Judging History

This is the latest submission verdict.

  • [2024-10-27 23:55:12]
  • Judged
  • Verdict: WA
  • Time: 11ms
  • Memory: 10736kb
  • [2024-10-27 23:55:07]
  • Submitted

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