求助大佬,九个爆零
查看原帖
求助大佬,九个爆零
14902
MyCycle楼主2018/6/7 17:07

#include using namespace std; int main() { int n; cin >> n; int a[1000], b[1000], c[1000], d[1000]; for (int i = 1; i <= n; i++) { cin >> a[i] >> b[i] >> c[i] >> d[i]; } int x, y; cin >> x >> y; for (int i = n; i >=1 ; i--) { if (x >= a[n] && x <= a[n] + c[n]) if (y >= b[n] && y <= b[n] + d[n]) { cout << i; return 0; } } cout << -1; return 0; }

2018/6/7 17:07
加载中...