# BZOJ3621: 我想那还真是令人高兴啊 复数运算

#include<cstdio>
#include<cmath>
using namespace std;
#define y1 __y__
struct cpx
{
double a,b;
cpx(const double &a=0,const double &b=0):a(a),b(b){}
cpx(FILE* f){fscanf(f,"%lf%lf",&a,&b);}
#define c ano.a
#define d ano.b
inline cpx operator + (const cpx &ano) const
{return cpx(a+c,b+d);}
inline cpx operator - (const cpx &ano) const
{return cpx(a-c,b-d);}
inline cpx operator * (const cpx &ano) const
{return cpx(a*c-b*d,a*d+b*c);}
inline cpx operator / (const cpx &ano) const
{
double temp=c*c+d*d;
return cpx((a*c+b*d)/temp,(b*c-a*d)/temp);
}
inline bool operator == (const cpx &ano) const
{return fabs(a-c)<1e-4&&fabs(b-d)<1e-4;}
inline void operator() (FILE* f){fprintf(f,"%lf %lf\n",a,b);}
}ans,a1,a2,a3;
int t;
inline bool check(const cpx &b1,const cpx &b2,const cpx &b3)
{
cpx __t=(b1-b2)/(a1-a2);
ans=(a1*__t-b1)/(__t-cpx(1.0,0.0));
return (a3-ans)*__t==(b3-ans);
}
int main()
{
scanf("%d",&t);
while(t--)
{
a1=stdin,a2=stdin,a3=stdin;
cpx b1(stdin),b2(stdin),b3(stdin);
if(check(b1,b2,b3)) goto successed_to_match;
if(check(b1,b3,b2)) goto successed_to_match;
if(check(b2,b1,b3)) goto successed_to_match;
if(check(b2,b3,b1)) goto successed_to_match;
if(check(b3,b1,b2)) goto successed_to_match;
if(check(b3,b2,b1)) goto successed_to_match;
successed_to_match:
ans(stdout);
}
return 0;
}

举报原因： 您举报文章：BZOJ3621: 我想那还真是令人高兴啊 复数运算 色情 政治 抄袭 广告 招聘 骂人 其他 (最多只允许输入30个字)