我的程序帮我看看那里有错 60分
查看原帖
我的程序帮我看看那里有错 60分
1073825
chenjunchao001楼主2024/8/14 20:56
#include<bits/stdc++.h>
using namespace std;
int main(){
    long long int n,m,x,y;
    long long int s[10005][10];
    cin>>n;
    for(int i=1;i<=n;i++){
        for(int j=1;j<=4;j++){
            cin>>s[i][j];
        }
    }
    cin>>x>>y;
    for(int i=n;i>=1;i--){
        m=-1;
        if(s[i][1]<=x and x<=s[i][3]){
            if(s[i][2]<=y and x<=s[i][4]){
                m=i;
                cout<<m;
                return 0;
            }
        }
    }
    cout<<m;
}
2024/8/14 20:56
加载中...