- 9


read x(k),y(k) x(k),y(k)

? x(k),y(k) x(k),y(k)

next k

for k = 1 to n k = 1

for l = 1 to n l = 1

dx = x(k) - x(l) dx = x(k) - x(l)

dy = y(k) - y(l) dy = y(k) - y(l)

rs = dx*dx + dy*dy rs = dx*dx + dy*dy

r(k,l) = sqr(rs) r(k,l) = sqr(rs)

next 1

next k

return

 

mrshrt: ':

data 1, 2, 3, 4

data 1, 2, 4, 3

data 1, 3, 2, 4

data 1, 2, 4, 3

data 1, 4, 2, 3

data 1, 4, 3, 2

 

tchks: '

data 0, 0

data 0, 3

data 4, 0

data 4, 3

:

:

0 0

03

4 0

4 3

 

: :

1 2 3 4 16

1 2 4 3 14

1 3 2 4 18

1 2 4 3 14

1 4 2 3 18

1 4 3 2 16

 

:

1 3 2 4

=18

 

:

1 2 4 3

= 14

 

, ­ . - .

4. .