// Problem D : Rotation Estimation #include #include #include #include #include #include using namespace std; const double EPS = 1e-8; typedef complex P; double rot(P a, P b) { return arg(conj(a)*b); } namespace std{ bool operator < (const P &a, const P &b){ return make_pair(real(a),imag(a)) < make_pair(real(b),imag(b)); } } int main(){ int n; while(cin >> n, n){ vector

vp1(n), vp2(n); P g1 = P(0,0), g2 = P(0,0); double x, y; for(int i=0;i> x >> y; vp1[i] = P(x,y); g1 += vp1[i]; } for(int i=0;i> x >> y; vp2[i] = P(x,y); g2 += vp2[i]; } g1 /= n; g2 /= n; // 重心を重ね合わせる for(int i=0;i tmp(n); for(int j=0;j