- 10


k = 1 N for k = 1 to N

i := L(k) i = L(k)

(tv(i),c(i),p(i)) ? tv$(i);c(i);p(i)

next k

return

 

, x[l:N], L[1:N] :

 

sortmas: '

'

k = 1 N-1 for k = 1 to N-1

xmn := x(k) xmn = x(k)

imn := k imn = k

i = k + 1 N for i = k + 1 to N

x(i) < xmn if x(i) < xmn then

xmn := x(i) xmn = x(i)

imn := i imn = i

end if

next i

Imn := L(imn) Imn = L(imn)

xmn := x(imn) xmn = x(imn)

L(imn) := L(k) L(imn) = L(k)

x(imn) := x(k) x(imn) = x(k)

L(k) :=Imn L(k) = Imn