Program s;
uses crt;
const n=1;
Var i,j,otvet,prov:integer;
st:array[1..n] of string[n];
a:array[1..n,1..n] of integer;
Begin
For i:=1 to n do
Begin
For j:=1 to n do
Begin
a[i,j]:=random(n+1);
Write(a[i,j],' ');
End;
Writeln;
End;
For i:=1 to n do
For j:=1 to n do
st[i]:=st[i]+inttostr(a[i,j]);
For i:=1 to n-1 do
begin
For j:=i+1 to n do
if st[i]<>st[j] then
prov:=prov+1;
if prov=n-i then otvet:=otvet+1;
prov:=0;
End;
Writeln('Ответ = ',otvet+1)
End.