//yukicoder@cpp17 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; using P = pair; const ll MOD = 998244353; const ll MODx = 1000000007; const int INF = (1<<30)-1; const ll LINF = (1LL<<62LL)-1; const double EPS = (1e-10); P ar4[4] = {{0,1},{0,-1},{1,0},{-1,0}}; P ar8[8] = {{-1,-1},{-1,0},{-1,1},{0,-1},{0,1},{1,-1},{1,0},{1,1}}; template vector make_vector(size_t a, T b) { return vector(a, b); } template auto make_vector(size_t a, Ts... ts) { return vector(a, make_vector(ts...)); } /* 確認ポイント cout << fixed << setprecision(n) << 小数計算//n桁の小数表記になる 計算量は変わらないが楽できるシリーズ min(max)_element(iter,iter)で一番小さい(大きい)値のポインタが帰ってくる count(iter,iter,int)でintがiterからiterの間にいくつあったかを取得できる */ /* comment outed because can cause bugs __attribute__((constructor)) void initial() { cin.tie(0); ios::sync_with_stdio(false); } */ void solve(){ vector> A(6); long double mn = 2; int mni = -1; for(int i = 0; 6 > i; i++){ cin>>A[i].first>>A[i].second; if(mn > A[i].first){ mn = A[i].first; mni = i; } } if(A[mni].second > 0){ long double dist1 = (((A[mni].first)*(A[mni].first))+(A[mni].second*A[mni].second)); long double dist2 = (((A[mni].first-1)*(A[mni].first-1))+(A[mni].second*A[mni].second)); long double ans = (acos((dist1+dist1-dist2)/(2))*180/acos((long double)-1) - 120); if(ans + EPS > 50)ans = 0; cout << fixed << setprecision(10) << (isnanl(ans) ? 0 : ans) << endl; }else{ long double dist1 = (((A[mni].first)*(A[mni].first))+(A[mni].second*A[mni].second)); long double dist2 = (((A[mni].first-1)*(A[mni].first-1))+(A[mni].second*A[mni].second)); long double ans = (180.0 - acos((dist1+dist1-dist2)/(2))*180/acos((long double)-1)); if(ans + EPS > 50)ans = 0; cout << fixed << setprecision(10) << (isnanl(ans) ? 0 : ans) << endl; } return; } int main(){ int t;cin>>t; for(int i= 0; t > i; i++)solve(); }