提交时间:2025-12-26 14:26:01

运行 ID: 77549

#include<iostream> #include<cstring> using namespace std; const int MAXN = 10000 + 5; int v[MAXN][MAXN]; //爆0的罪魁祸首 int main() { memset(v, -1, sizeof(v)); int n; cin >> n; for(int i = 1; i <= n; i++) { int a, b, g, k; cin >> a >> b >> g >> k; for(int x = a; x <= a + g; x++) { for(int y = b; y <= b + k; y++) { v[x][y] = i; } } } int x, y; cin >> x >> y; cout << v[x][y] << endl; return 0; }