讨论 / 怎么会这样? 求解
纯属娱乐734 2014-04-16 08:47:36
点我顶贴 收藏 删除
program j11;

var a,b:array[1..100,1..100] of boolean;

i,j,c,d,e,f,l,m,n,o,g,h,k:integer;

begin

for i:=1 to 100 do

for j:=1 to 100 do

begin

a[i,j]:=false;

b[i,j]:=false;

end;

g:=0;h:=0;k:=0;

readln(c,d,e,f);

for i:=c to e do

for j:=d to f do

a[i,j]:=true;

readln(l,m,n,o);

for i:=l to n do

for j:=m to o do

b[i,j]:=true;

for i:=1 to 100 do

for j:=1 to 100 do

begin

if a[i,j]=false and b[i,j]=false then inc(g) else begin

if a[i,j]=true and b[i,j]=true then inc(k) else h:=0;

end;

end;

h:=10000-g-k;

writeln(k,' ',h,' ',g,' ');

end.

查看更多回复
提交回复