#include <iostream> #include <stdio.h> #include <string> #include <cstring> #include <map> using namespace std; struct Node { int x, y; int minx, miny; int maxx, maxy; }s[10001]; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { int Lenx, Leny; cin >> s[i].x >> s[i].y >> Lenx >> Leny; s[i].minx = s[i].x; s[i].maxx = s[i].x + Lenx; s[i].miny = s[i].y; s[i].maxy = s[i].y + Leny; } int x, y; cin >> x >> y; int flag = 1; for (int i = n - 1; i >= 0; i--) { if (x >= s[i].minx&&x <= s[i].maxx&&y >= s[i].miny&&y <= s[i].maxy) { cout << i + 1 << endl; flag = 0; break; } } if (flag) cout << "-1" << endl; return 0; }
0.0分
0 人评分
永远的丰碑 (C语言代码)浏览:655 |
c primer plus 第十二章 12.1小节浏览:377 |
母牛的故事 (C语言代码)浏览:920 |
C语言程序设计教程(第三版)课后习题3.7 (C语言代码)浏览:449 |
WU-蓝桥杯算法提高VIP-勾股数 (C++代码)浏览:1593 |
【求[X,Y]内被除3余1并且被除5余3的整数的和】 (C语言代码)浏览:673 |
K-进制数 (C语言描述,蓝桥杯)浏览:925 |
C语言程序设计教程(第三版)课后习题5.5 (C语言代码)浏览:554 |
简单的a+b (C语言代码)浏览:478 |
1035 题解浏览:779 |