Program tyo;
var a: array of array of integer;
p: array of integer;
i, j,t,cnt,l,u, sum, w: integer;
m,n,k : integer;
begin

read (m);

read (n);

read (k);
setlength (p, m+1);
for i: =1 to m do
read (p[i]);

setlength (a, n+1);
for i: =0 to n do
setlength (a[i], k+1);

cnt: =0;
for i: =1 to n do
for j: =1 to k do

read (a[i,j]);

w: =0;
for i: =n downto 1 do
begin
u: =0;
for j: =1 to m do
begin
cnt: =cnt+1;
sum: =0; ;
for t: =u+1 to u+p[j] do
sum: =sum+(a[i,t]);
if sum=0 then begin w: =w+1; end;

u: =u+p[j];

end;
end;
writeln (w); cnt: =0;
for i: =n downto 1 do
begin
u: =0;
for j: =1 to m do
begin
cnt: =cnt+1;
sum: =0; ;
for t: =u+1 to u+p[j] do
sum: =sum+(a[i,t]);
if sum=0 then begin writeln (cnt); end;

u: =u+p[j];

end;
end;
end.
что это ткое?

0909044 0909044    1   23.12.2019 15:12    1

Другие вопросы по теме Информатика