QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#355636#7933. Build Permutationteikn#WA 0ms9548kbPython3212b2024-03-17 00:33:252024-03-17 00:33:26

Judging History

你现在查看的是最新测评结果

  • [2024-03-17 00:33:26]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:9548kb
  • [2024-03-17 00:33:25]
  • 提交

answer

n=int(input())
vs=list(map(int,input().split()))
lo=min(vs)
hi=max(vs)
if len(set(vs))==n and hi-lo+1==n:
    targ=hi+1
    for i in range(n):
        vs[i]=targ-vs[i]
    print(*vs)
else:
    print(-1)

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 9548kb

input:

5
4 2 5 1 3

output:

2 4 1 5 3

result:

wrong answer