DIM a(4, 4)
DATA 0,0,0,1,0,0,1,2,0,1,2,3,1,2,3,4
FOR i = 1 TO 4
FOR j = 1 TO 4
READ a(i, j)
NEXT
NEXT
FOR i = 1 TO 4
FOR j = 1 TO 4
PRINT a(i, j); " ";
NEXT
PRINT
NEXT
FOR i = 1 TO 4
FOR j = 1 TO 4
FOR k = 1 TO 4
FOR l = 1 TO 4
IF (i <> k) AND (j <> l) AND (a(i, j) = a(k, l)) THEN f = 1
NEXT
NEXT
NEXT
NEXT
IF f = 1 THEN PRINT "yes" ELSE PRINT "no"
Тестирование выполнено в программе QB64 ( Скачать )