90求调第五个过不去Wa
查看原帖
90求调第五个过不去Wa
1420919
awdfkewd楼主2024/8/25 10:04
#include <iostream>
#include <string.h>
#include<vector>
using namespace std;
int n;
int a,b,g,k,x,y;
long long A[10010],B[10010],G[10010],K[10010];
int main(){
	cin>>n;
	for(int i=1;i<=n;i++){
		cin>>A[i]>>B[i]>>G[i]>>K[i];
	}
	cin>>x>>y;
	for(int i=n;i>0;i--){
		if(x>=A[i]&&x<=G[i]){
			if(y>=B[i]&&y<=K[i]){
				cout<<i;
				return 0;
			}
		}
	}
	cout<<-1;
}
2024/8/25 10:04
加载中...