#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#define MAX 200
typedef struct cherry
{
int x, y;
}C;
int N;
C ch[MAX];
int cal( int A, int B )
{
int time, x, y;
x = y = 0;
for( time = 0; time < 2*N; time++ )
{
if( (ch[time].x * A + ch[time].y * B) > 0 )
x++;
if( (ch[time].x * A + ch[time].y * B) < 0 )
y++;
}
if( x == y && x + y == 2 *N )
return 1;
else
return 0;
}
int main()
{
int i, flag, j;
while( scanf( "%d", &N ) && N )
{
flag = 0;
for( i = 0; i < 2*N; i++ )
scanf( "%d%d", &ch[i].x, &ch[i].y );
for( i = -500; i <= 500; i++ )
{
for( j = -500; j <= 500; j++ )
if( cal( i, j ) )
{
printf( "%d %d\n", i, j );
flag = 1;
break;
}
if( flag )
break;
}
}
return 0;
}
UVA 10167
最新推荐文章于 2018-08-12 23:17:36 发布
部署运行你感兴趣的模型镜像
您可能感兴趣的与本文相关的镜像
Stable-Diffusion-3.5
图片生成
Stable-Diffusion
Stable Diffusion 3.5 (SD 3.5) 是由 Stability AI 推出的新一代文本到图像生成模型,相比 3.0 版本,它提升了图像质量、运行速度和硬件效率
124

被折叠的 条评论
为什么被折叠?



