mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
37 lines
703 B
C++
37 lines
703 B
C++
|
#include <iostream>
|
||
|
#include <cstdio>
|
||
|
#include <cstring>
|
||
|
using namespace std;
|
||
|
const int maxn=200005;
|
||
|
struct node
|
||
|
{
|
||
|
int x,y;
|
||
|
} p[maxn];
|
||
|
int main()
|
||
|
{
|
||
|
int n;
|
||
|
int i;
|
||
|
while(scanf("%d",&n),n)
|
||
|
{
|
||
|
for(i=1; i<=n; i++)
|
||
|
{
|
||
|
scanf("%d%d",&p[i].x,&p[i].y);
|
||
|
}
|
||
|
int sum=0;
|
||
|
int ans=0;
|
||
|
for(i=1; i<=n; i++)
|
||
|
{
|
||
|
if((p[i].x<p[n/2+1].x&&p[i].y>p[n/2+1].y)||(p[i].x>p[n/2+1].x&&p[i].y<p[n/2+1].y))
|
||
|
{
|
||
|
sum++;
|
||
|
}
|
||
|
else if((p[i].x<p[n/2+1].x&&p[i].y<p[n/2+1].y)||(p[i].x>p[n/2+1].x&&p[i].y>p[n/2+1].y))
|
||
|
{
|
||
|
ans++;
|
||
|
}
|
||
|
}
|
||
|
cout<<ans<<" "<<sum<<endl;
|
||
|
}
|
||
|
return 0;
|
||
|
}
|