50求条
查看原帖
50求条
1786837
Killeryudingyue楼主2025/7/22 13:35
#include<bits/stdc++.h>
using namespace std;
int op[10005][5390];
int main(){
	int n,x,y; 
	cin>>n;
	for(int i=1;i<=n;i++){
		int a,b,g,k;
		cin>>a>>b>>g>>k;
		for(int j=a;j<=a+g;j++){
			for(int x=b;x<=b+k;x++){
				op[j][x]=i;
			}
		}
	}
	cin>>x>>y;
	if(op[x][y]==0){
		cout<<-1<<endl;
	}
	else{
		cout<<op[x][y]<<endl;
	}
	return 0;
}
2025/7/22 13:35
加载中...