QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#355636 | #7933. Build Permutation | teikn# | WA | 0ms | 9548kb | Python3 | 212b | 2024-03-17 00:33:25 | 2024-03-17 00:33:26 |
Judging History
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