#include <bits/stdc++.h>
#define ll long long
using namespace std;
struct node{
int x1,x2,y1,y2;
}a[11];
int mp[2560][1440];
void update(int id,node n){
for(int i=n.x1;i<=n.x2;i++){
for(int j=n.y1;j<=n.y2;j++)
mp[i][j]=id;
}
}
int main(int argc, char** argv)
{
int n,m,x,y,cnt=0;
cin>>n>>m;//每个窗口都存起来。
for(int i=1;i<=n;i++){
scanf("%d %d %d %d",&a[i].x1,&a[i].y1,&a[i].x2,&a[i].y2);
update(i,a[i]);
}
for(int i=0;i<m;i++){
scanf("%d %d",&x,&y);
if(mp[x][y]==0)puts("IGNORED");
else {printf("%d\n",mp[x][y]);
int id=mp[x][y];
update(mp[x][y],a[id]);
}
}
return 0;
}
2014 3-2窗口
猜你喜欢
转载自blog.csdn.net/ilikecarrots/article/details/88091747
今日推荐
周排行