- 铺地毯
- 2015-01-27 15:19:25 @
评测结果
编译成功
测试数据 #0: Accepted, time = 0 ms, mem = 488 KiB, score = 10
测试数据 #1: Accepted, time = 0 ms, mem = 492 KiB, score = 10
测试数据 #2: Accepted, time = 0 ms, mem = 492 KiB, score = 10
测试数据 #3: Accepted, time = 0 ms, mem = 488 KiB, score = 10
测试数据 #4: Accepted, time = 15 ms, mem = 496 KiB, score = 10
测试数据 #5: Accepted, time = 0 ms, mem = 488 KiB, score = 10
测试数据 #6: RuntimeError, time = 31 ms, mem = 496 KiB, score = 0
测试数据 #7: RuntimeError, time = 15 ms, mem = 488 KiB, score = 0
测试数据 #8: RuntimeError, time = 15 ms, mem = 484 KiB, score = 0
测试数据 #9: RuntimeError, time = 15 ms, mem = 484 KiB, score = 0
RuntimeError, time = 91 ms, mem = 496 KiB, score = 60
代码
#include <cstdio>
#include <iostream>
using namespace std;
int a[1005],b[1005],c[1005],d[1005];
int n,x,y,s=-1;
int main (){
int i;
scanf("%d",&n);
for (i=1;i<=n;i++){
scanf("%d%d%d%d",&a[i],&b[i],&c[i],&d[i]);
c[i]+=a[i];
d[i]+=b[i];
}
scanf("%d%d",&x,&y);
for (i=1;i<=n;i++)
if (x>=a[i] && x<=c[i] && y>=b[i] && y<=d[i])
s=i;
printf ("%d\n",s);
return 0;
}
求解啊!
4 条评论
-
140142 LV 9 @ 2015-01-30 14:13:09
我只是想说,那不是四个点没过嘛!(笑
-
2015-01-28 11:33:15@
数据量是10000你开了1000的数组
-
2015-01-27 18:51:13@
你的数组开小了。
-
2015-01-27 15:19:52@
有人吗
- 1