Pagini recente » Cod sursa (job #1559138) | Cod sursa (job #36562) | Cod sursa (job #30170) | Cod sursa (job #88667) | Cod sursa (job #18166)
Cod sursa(job #18166)
type productie=0..1000000000;
var plant:array[1..500,1..500] of ^productie;
i,j,n:1..500;
procedure asignare;
begin
assign(input,'plantatie.in');
reset(input);
assign(output,'plantatie.out');
rewrite(output);
end;
procedure citire;
begin
readln(n);
for i:=1 to n do
begin
for j:=1 to n do
begin
new(plant[i,j]);
read(plant[i,j]^);
end;
readln;
end;
end;
procedure intrebare;
var x,y,l:1..500;
max:0..1000000000;
begin
max:=0;
readln(x,y,l);
for i:=x to x+l-1 do
for j:=y to y+l-1 do
if plant[i,j]^>max then max:=plant[i,j]^;
writeln(max);
end;
begin
asignare;
citire;
while not eof do intrebare;
close(output);
end.