当前位置:网站首页>CSP window
CSP window
2022-07-03 23:56:00 【< WRM>】
#include<bits/stdc++.h>
using namespace std;
const int N=50;
struct node {
int x1,y1,x2,y2;
int level;
int number;
}a[N];
bool compare (node x,node y) {
return x.level>y.level;
}
int main() {
int n,m;
scanf("%d%d",&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);
a[i].level=i;
a[i].number=i;
}
for(int i=1;i<=m;i++) {
int x,y;
scanf("%d%d",&x,&y);
sort(a+1,a+n+1,compare);
int flag=0;
for(int j=1;j<=n;j++) {
if(x>=a[j].x1&&x<=a[j].x2&&y>=a[j].y1&&y<=a[j].y2) {
printf("%d\n",a[j].number);
a[j].level=a[1].level+1;
flag=1;
break;
}
}
if(!flag) printf("IGNORED\n");
}
}
边栏推荐
- SQL data update
- [MySQL] classification of multi table queries
- 网上的低佣金链接安全吗?招商证券怎么开户?
- 2022 free examination questions for hoisting machinery command and hoisting machinery command theory examination
- Tencent interview: can you pour water?
- The first game of the new year, many bug awards submitted
- D27:mode of sequence (maximum, translation)
- FPGA tutorial and Allegro tutorial - link
- 2.14 summary
- Tencent interview: can you find the number of 1 in binary?
猜你喜欢

Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?

It is forbidden to splice SQL in code

Recursive least square adjustment

2022 system integration project management engineer examination knowledge points: software development model

Briefly understand the operation mode of developing NFT platform

STM32 GPIO CSDN creative punch in

Common mode interference of EMC

Fluent learning (4) listview

leetcode-43. String multiplication

How to quickly build high availability of service discovery
随机推荐
Subgraph isomorphism -subgraph isomorphism
Introduction to the gtid mode of MySQL master-slave replication
Gossip about redis source code 79
Tencent interview: can you find the number of 1 in binary?
Open 2022 efficient office, starting from project management
Recursive least square adjustment
[note] glide process and source code analysis
D23:multiple of 3 or 5 (multiple of 3 or 5, translation + solution)
Kubedl hostnetwork: accelerating the efficiency of distributed training communication
Unity shader visualizer shader graph
Unity elementary case notes of angry birds Siki college 1-6
【leetcode】374. Guess the size of the number
2022 t elevator repair registration examination and the latest analysis of T elevator repair
Actual combat | use composite material 3 in application
Gossip about redis source code 74
It is forbidden to splice SQL in code
The first game of the new year, many bug awards submitted
Minimum commission for stock account opening. Stock account opening is free. Is online account opening safe
How to solve the "safe startup function prevents the operating system from starting" prompt when installing windows10 on parallel desktop?
Investment demand and income forecast report of China's building ceramics industry, 2022-2028