纯模拟
#include <stdio.h>
double dist(double x, double y)
{
return x*x+y*y;
}
int main()
{
int sum[2];
double x[2][3], y[2][3];
while ( scanf("%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf", &x[0][0], &y[0][0], &x[0][1], &y[0][1], &x[0][2], &y[0][2], &x[1][0], &y[1][0], &x[1][1], &y[1][1], &x[1][2], &y[1][2]), x[0][0] != -100.0 )
{
sum[0]=0, sum[1]=0;
double dis;
int i, j;
for ( j = 0; j < 2; j++ )
{
for ( i = 0; i < 3; i++ )
{
dis= dist( x[j][i], y[j][i] );
if (dis <= 9.0) sum[j]+=100;
else if ( dis <= 36.0 ) sum[j]+=80;
else if ( dis <= 81.0 ) sum[j]+=60;
else if ( dis <= 144.0 ) sum[j]+=40;
else if ( dis <= 225.0 ) sum[j]+=20;
}
}
printf("SCORE: %d to %d, ", sum[0], sum[1]);
if ( sum[0] > sum[1] ) printf("PLAYER 1 WINS.\n");
else if ( sum[0] < sum[1] ) printf("PLAYER 2 WINS.\n");
else printf("TIE.\n");
}
return 0;
}