|
本帖最后由 Jason1129 于 2022-9-4 11:06 编辑
- #include<iostream>
- #include<cstdio>
- #include<string.h>
- #include<algorithm>
- #define N 100001
- using namespace std;
- int main(){
- int a[N],b[N],c[N],d[N];
- int n,i,j;
- int x,y;
- cin>>n;
- for (i=0;i<n;i++)
- {
- cin>>a[i]>>b[i]>>c[i]>>d[i];
- }
- cin>>x>>y;
- for (i=n;i>=0;i--)
- {
- if (x>=a[i] && x<=a[i]+c[i] && y>=b[i] && y<=b[i]+d[i])
- {
- cout<<i+1;
- return 0;
- }
-
- }
- cout<<"-1";
- return 0;
- }
复制代码
|
|