#include #include using namespace std; using namespace atcoder; #define rep(i, n) REP(i, 0, n) #define REP(i, s, e) for (ll i = (s); i < (ll)(e); i++) #define repr(i, n) REPR(i, n, 0) #define REPR(i, s, e) for (ll i = (ll)(s - 1); i >= (ll)(e); i--) #define all(r) r.begin(), r.end() #define rall(r) r.rbegin(), r.rend() typedef long long ll; typedef vector vi; typedef vector vl; template bool chmax(T& a, const U& b) { if (a >= b) return false; a = b; return true; } template bool chmin(T& a, const U& b) { if (a <= b) return false; a = b; return true; } void yes_no(bool f, string yes = "Yes", string no = "No") { cout << (f ? yes : no) << "\n"; } //----------基本部分----------------------------------------------------------------------- #define X real() #define Y imag() #define x(p) real(p) #define y(p) imag(p) #define curr(P, i) P[i] #define next(P, i) P[(i + 1) % P.size()] #define prev(P, i) P[(i + P.size() - 1) % P.size()] using D = long double; const D EPS = 1e-8; const D INF = 1e12; const D PI = acos(-1); typedef complex P; typedef complex point; namespace std { bool operator<(const P& a, const P& b) { return x(a) != x(b) ? x(a) < x(b) : y(a) < y(b); } } // namespace std D cross(const P& a, const P& b) { return y(conj(a) * b); } D dot(const P& a, const P& b) { return x(conj(a) * b); } struct L : public vector

{ L(const P& a, const P& b) { push_back(a); push_back(b); } }; typedef vector

G; typedef vector

polygon; struct C { P p; D r; C(const P& p, D r) : p(p), r(r) {} }; // 点の進行方向 int ccw(P a, P b, P c) { b -= a; c -= a; if (cross(b, c) > 0) return +1; // counter clockwise if (cross(b, c) < 0) return -1; // clockwise if (dot(b, c) < 0) return +2; // c--a--b on line if (norm(b) < norm(c)) return -2; // a--b--c on line return 0; } // // 凸包 - convex hull 同一直線上の点は除去(除去したくない場合は、ccw(...)<=0 ==> ccw(...)!=-1) CGL_4_A vector convex_hull(vector ps) { int n = ps.size(), k = 0; sort(ps.begin(), ps.end()); vector ch(2 * n); for (int i = 0; i < n; ch[k++] = ps[i++]) // lower-hull while (k >= 2 && ccw(ch[k - 2], ch[k - 1], ps[i]) <= 0) --k; for (int i = n - 2, t = k + 1; i >= 0; ch[k++] = ps[i--]) // upper-hull while (k >= t && ccw(ch[k - 2], ch[k - 1], ps[i]) <= 0) --k; ch.resize(k - 1); return ch; } void solve() { const int n = 6; vector

ps; rep(i, n) { D x, y; cin >> x >> y; ps.emplace_back(x, y); } const D pi = acosl(-1); D SUP = 50; P a{-1, 0}; rep(i, n) { P p = ps[i] / a; D arg = atan2(p.Y, p.X) * 180 / pi; if (arg > -EPS && arg < SUP) { cout << fixed << setprecision(15); cout << arg << '\n'; return; } } } int main() { cin.tie(0); ios::sync_with_stdio(false); int t = 1; cin >> t; rep(ti, t) solve(); return 0; }