暴力,先确定左右边界,再遍历y,注意剪枝
#include <list>
#include <map>
#include <set>
#include <queue>
#include <string>
#include <deque>
#include <stack>
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <limits.h>
#include <time.h>
#include <string.h>
using namespace std;
#define LL long long
#define PI acos(-1.0)
#define MAX INT_MAX
#define MIN INT_MIN
#define eps 1e-8
#define FRE freopen("a.txt","r",stdin)
#define MOD 1000000007
#define N 1004
int n;
struct point{
int x,y;
}p[N];
int ll;
int Y[N];
bool cmp(point a,point b){
return a.x<b.x;
}
int gao(int l,int r){
int i,j;
int cnt=0;
for(i=0;i<n;i++){
if(p[i].x>=l && p[i].x<=r)
Y[cnt++]=p[i].y;
}
sort