Page 64 - C:\Users\Admin\Desktop\Sach mem upweb\
P. 64
100 Problems & Solutions Trang 64
FillChar(cot,SizeOf(cot),0);
hangthieu := sh;
cotthieu := sc;
taobien(i ,j);
For jj := 1 to j do
begin
sl:= 1;
qi[1] := 1;
qj[1] := jj;
duyet(1,0);
dd[1,jj] := 2;
end;
End;
Procedure Duyethinhbao;
Var i ,j : integer;
minj ,maxj : integer;
Begin
For i := lonmin to n do
begin
minj := (n-1) div i + 1;
maxj := min2(n+1-i,i);
For j := minj to maxj do duyetcauhinh(i,j);
end;
End;
Procedure Ghicuoi;
Var f : file of char;
s : string;
i : integer;
Begin
str(slch,s);
Assign(f,fg); reset(f);
Seek(f,0);
For i := 1 to length(s) do Write(f,s[i]);
Close(f);
End;
BEGIN
Clrscr;
Assign(f,fg); Rewrite(f);
Writeln(f ,' ');
Nhap;
Chuanbi;
duyethinhbao;
Close(f);
ghicuoi;
END.
Bài 13/1999 - Phân hoạch hình chữ nhật
Tin học & Nhà trường 100 Đề Toán - Tin học