import java.util.LinkedList;
import java.util.Queue;
import java.util.Scanner;
public class Main{
static class Screen{
int x1;
int x2;
int y1;
int y2;
int no;
}
public static void main(String[] args) {
Scanner sc = new Scanner (System.in);
int n = sc.nextInt(),m = sc.nextInt();
Screen s[] = new Screen[n];
for(int i =0;i<n;i++){
Screen screen = new Screen();
screen.x1 = sc.nextInt();
screen.y1 = sc.nextInt();
screen.x2 = sc.nextInt();
screen.y2 = sc.nextInt();
screen.no = i+1;
s[i] = screen;
}
for (int i = 1;i<=m;i++){
int x = sc.nextInt();
int y =sc.nextInt();
boolean flag = true;
for(int j = n-1;j>=0;j--){
if(x>=s[j].x1&&x<=s[j].x2&&y>=s[j].y1&&y<=s[j].y2){
System.out.println(s[j].no);
Screen temp = s[j];
s[j] = s[n-1];
s[n-1] =temp;
flag =false;
break;
}
}
if(flag){
System.out.println("IGNORED");
}
}
}
}
ccf窗口
最新推荐文章于 2022-02-22 09:55:30 发布