题目地址:​​点击打开链接​

思路:简单的坐标判断,水题

AC代码:

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <queue>
#include <stack>
#include <map>
#include <cstring>
#include <climits>
#include <cmath>
#include <cctype>

using namespace std;

struct point
{
int x,y;
}a[110];

int main()
{
int i,j;
int n,m;
scanf("%d%d",&n,&m);
for(i=1; i<=n; i++)
{
scanf("%d%d",&a[i].x,&a[i].y);
}
int x,y;
for(i=1;i<=m; i++)
{
int wang = 0;
int dong = 0;
scanf("%d%d",&x,&y);
for(j=1; j<=n; j++)
{
if((a[j].x < x && a[j].y > y) || (a[j].x > x && a[j].y < y))
{
wang++;
}
else
{
dong++;
}
}
printf("%d\n",dong-wang);
}
return 0;
}