Используя закон склеивания получаем (AvC)^(Av-C)^(-BvC) = A^(-BvC)
P.S. (AvC)^(Av-C)=A
24 бита ×<span> 800 </span>×<span> 600 = 11 520 000 бит = 1 440 000 байт</span>
Var
n,m,i,j,k1,k2: integer;
a: array[1..100,1..100] of integer;
begin
readln(n,m);
for i:=1 to n do
for j:=1 to n do readln(a[i,j]);
for i:=1 to n do
for j:=1 to n do
if a[i,j]>0 then inc(k1) else inc(k2);
for i:=1 to n do
for j:=1 to n do
if (k1>k2) and (a[i,j]>0) then writeln(a[i,j]) else
if (k1<k2) and (a[i,j]<0) then writeln(a[i,j])
<span>end.</span>