/* -*- coding: utf-8 -*- * * 105.cc: No.105 arcの六角ボルト - yukicoder */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; /* constant */ typedef long double ld; const ld PI = acosl(-1.0); const ld MIN_TH = 0.0; const ld MAX_TH = PI * 50 / 180; /* typedef */ /* global variables */ ld xs[6], ys[6]; /* subroutines */ /* main */ int main() { //printf("MIN_TH=%lf, MAX_TH=%lf\n", MIN_TH, MAX_TH); int tn; cin >> tn; while (tn--) { ld cx = 0.0, cy = 0.0; for (int i = 0; i < 6; i++) { cin >> xs[i] >> ys[i]; cx += xs[i]; cy += ys[i]; } ld ans = 0.0; for (int i = 0; i < 6; i++) { ld th = atan2l(ys[i] - cy, xs[i] - cx); if (MIN_TH <= th && th < MAX_TH) { //printf("%d: (%lf,%lf)=%lf\n", i, x, y, th); ans = th * 180 / PI; } } printf("%.12Lf\n", ans); } return 0; }