/ SB域 /

记录详情

Accepted

/usr/bin/ld.bfd: warning: /out/link.res contains output sections; did you forget -T?
# 状态 耗时 内存占用
#1 Accepted 1ms 256.0 KiB
#2 Accepted 1ms 256.0 KiB
#3 Accepted 1ms 256.0 KiB
#4 Accepted 1ms 256.0 KiB
#5 Accepted 1ms 256.0 KiB
#6 Accepted 1ms 256.0 KiB
#7 Accepted 1ms 256.0 KiB
#8 Accepted 2ms 256.0 KiB
#9 Accepted 2ms 256.0 KiB
#10 Accepted 1ms 256.0 KiB

代码

type rec=record
x1,y1,x2,y2:longint;
end;
var n,x,y,i,j,k,ans,max,xx,yy:longint;
    a:array[1..10000]of rec;
begin
 readln(n,x,y);
 for i:=1 to n do
 readln(a[i].x1,a[i].y1,a[i].x2,a[i].y2);
 for i:=1 to n do
  for j:=1 to n do begin
  xx:=a[i].x1; yy:=a[j].y1;
  ans:=0;
  for k:=1 to n do
   if (a[k].x1>=xx)and(a[k].x1<=xx+x)and(a[k].y1>=yy)and(a[k].y2<=yy+y)
   and(a[k].x2>=xx)and(a[k].x2<=xx+x)and(a[k].y2>=yy)and(a[k].y2<=yy+y)
   then inc(ans);
  if ans>max then max:=ans;
 end;
 writeln(max);
 close(input);
 close(output);
end.

信息

递交者
类型
递交
题目
一个矩形 OneMoreRectangle
题目数据
下载
语言
Pascal
递交时间
2017-08-22 16:20:37
评测时间
2017-08-22 16:20:37
评测机
分数
100
总耗时
17ms
峰值内存
256.0 KiB