Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
60931 | 杨宜炜 | 铺地毯 | C++ | Accepted | 1 MS | 268 KB | 375 | 2023-11-25 14:36:03 |
#include<bits/stdc++.h> using namespace std; struct dt{ int x1,y1,x2,y2; }; int main(){ int n,a,b,g,k,x,y,t=-1; cin>>n; dt c[n]; for(int i=0;i<n;i++){ cin>>a>>b>>g>>k; c[i].x1=a; c[i].y1=b; c[i].x2=a+g; c[i].y2=b+k; } cin>>x>>y; for(int i=0;i<n;i++){ if(c[i].x1<=x&&c[i].x2>=x&&c[i].y1<=y&&c[i].y2>=y){ t=i+1; } } cout<<t; }