讨论 / 这是什么问题?求指导。
刘鹏 2011-09-23 02:41:00
点我顶贴 收藏 删除
program rq639;

var

asafe,bsafe,csafe,x11,x12,y11,y12,x21,x22,y21,y22,i,j:longint;

a:array[0..105,0..105] of longint;

begin

readln(x11,y11,x12,y12);

readln(x21,y21,x22,y22);

asafe:=0;

bsafe:=0;

csafe:=0;

for i:=x11+1 to x12 do

for j:=y11+1 to y12 do inc(a[i,j]);

for i:=x21+1 to x22 do

for j:=y21+1 to y22 do inc(a[i,j]);

for i:=1 to 100 do

for j:=1 to 100 do

begin

if a[i,j]=2 then inc(asafe) else

if a[i,j]=1 then inc(bsafe) else

if a[i,j]=0 then inc(csafe);

end;

write(asafe,' ',bsafe,' ',csafe);

end.

下面是结果

测试结果1: 通过本测试点|有效耗时203ms

测试结果2: 通过本测试点|有效耗时47ms

测试结果3: 测试结果错误.错误结果为:0 188 9812

正确结果应为:0 194 9806

测试结果4: 通过本测试点|有效耗时47ms

测试结果5: 通过本测试点|有效耗时47ms

测试结果6: 通过本测试点|有效耗时47ms

测试结果7: 通过本测试点|有效耗时47ms

测试结果8: 通过本测试点|有效耗时47ms

测试结果9: 通过本测试点|有效耗时62ms

测试结果10: 通过本测试点|有效耗时47ms

查看更多回复
提交回复