Const Sz = 1000; var a: array [1..Sz] of integer; b: array [1..Sz] of integer; c: array [1..Sz] of integer; d: array [1..Sz] of integer; M: integer; N: integer; i: integer; k: integer;begin read(M); readln(N); for i:=1 to N do begin read(a[i]); readln(b[i]); if (a[i]<>0) then c[i]:=1 else c[i]:=0; end; for i:=1 to N do begin if(c[i]<>0) then begin for k:=1 to i do begin if(d[k]=0) then d[i]:=1; if (c[k]=i) then d[k]:=0; end; writeln(d[i]) end;end;end.
Program F90
integer i, j, k, s /0/, x/2/, y/6/, a(7, 7)
do k = 1, 4
do i = x - 1, y + 1
s = s + 1
a(x - 1, i) = s
end do
i = y + 1
do j = x, y + 1
s = s + 1
a(j, i) = s
end do
do i = y, x - 1, -1
s = s + 1
a(y + 1, i) = s
end do
i = x - 1
do j = y, x, -1
s = s + 1
a(j, i) = s
end do
x = x + 1
y = y - 1
end do
Print *, 'massive 15 = '
Write(*, '(7i5)') ((a(i, j), j=1, 7), i=1, 7)
End Program