第五个测试点爆WA,但不知道为什么(雾
查看原帖
第五个测试点爆WA,但不知道为什么(雾
821941
Starashes楼主2022/10/6 16:47

代码是

#include<cstdio>
#include <bits/stdc++.h>
#include <algorithm>
#include <string>

#define CE AC
#define TLE AC
#define MLE AC
#define OLE AC
#define RE AC
#define WA AC

const int MAXN = 10005;
using namespace std;
int arr[MAXN][5];
int main() {
	int n = 0; scanf("%d",&n);
	for(int i = 0;i < n; i ++) for(int j = 1;j <= 4; j ++) scanf("%d",&arr[i][j]);
	int x,y; scanf("%d%d",&x,&y);
	for(int i = n-1;i >= 0;i --) {
		if (arr[i][1] <= x and arr[i][3] >= x and arr[i][2] <= y and arr[i][4] >= y) {
			cout << i+1;
			return 0;
		}
	}
	cout << "-1";
    return 0;
}

就 感觉没什么问题 希望有大佬帮个忙)

2022/10/6 16:47
加载中...