#include<iostream>
using namespace std;
//struct point
//{
//
//
//};
int max(int a,int b)
{
if(a>b) return a;
else return b;
}
void swap(int &a,int &b)
{
int temp=a;
a=b;
b=temp;
}
int main()
{
int n;
cin>>n;
int a,b,c,d;
int xa[n],ya[n],xb[n],yb[n];
for(int i=0;i<n;i++)
{
// cin>>xa[i]>>ya[i]>>xb[i]>>yb[i];
cin>>a>>b>>c>>d;
if(a>c||b>d)
{
swap(a,c);
swap(b,d);
}
xa[i]=a;
ya[i]=b;
xb[i]=c;
yb[i]=d;
}
int s,t;
cin>>s>>t;
int count=0;
for(int i=0;i<n;i++)
{
if(xa[i]!=xb[i]&&s>=xa[i]&&s<=xb[i]&&t==ya[i]|| ya[i]!=yb[i]&&t>=ya[i]&&t<=yb[i]&&s==xa[i])
{
cout<<"BORDER"<<endl;
return 0;
}
}
for(int i=0;i<n;i++)
{
if(ya[i]!=yb[i]&&s<xa[i]&&t>ya[i]&&t<=yb[i])
count++;
}
if(count%2==1)
cout<<"INSIDE"<<endl;
else cout<<"OUTSIDE"<<endl;
}
转载于:https://www.cnblogs.com/814jingqi/p/3280292.html