提交时间:2024-11-08 14:59:32
运行 ID: 55758
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int x, y; cin >> x >> y; int ans = -1; for (int i = 1; i <= n; i++) { int a, b, g, k; cin >> a >> b >> g >> k; if (x >= a && x <= a + g && y >= b && y <= b + k) { ans = i; break; } } cout << ans << endl; return 0; }