1.ごり押し
dim p[n]
for i=0 to n-1
repeat
p[n]=rnd(n)
a=1
for j=0 to i-1
if p[i]==p[j] then a=0
next
until a
next
2.sort
dim p[n],r[n]
for i=0 to n-1
p[i]=i
r[i]=rnd(n*100)
next
sort r,p
3.swap
dim p[n]
for i=0 to n-1
p[i]=i
next
for i=0 to n-1
swap p[i],p[rnd(n)]
next