Program A5; Type mass=array [1..40] of integer; Var i, j,n,s: integer; Procedure horline; bedin read (n,m); for i:=1 to n for j:=1 to m do read(a[i,j]); end; Begin horline; read(B); for i:=1 to n do for j:=1 to m do if i+j=B then write (a[i,j], 'B'); end.
Type mass=array [1..40] of integer;
Var i, j,n,s: integer;
Procedure horline;
bedin
read (n,m);
for i:=1 to n
for j:=1 to m do read(a[i,j]);
end;
Begin
horline;
read(B);
for i:=1 to n do
for j:=1 to m do
if i+j=B then
write (a[i,j], 'B');
end.