結果

問題 No.105 arcの六角ボルト
ユーザー cureskolcureskol
提出日時 2020-04-06 16:42:24
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 75 ms / 5,000 ms
コード長 478 bytes
コンパイル時間 1,704 ms
コンパイル使用メモリ 169,080 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-20 18:00:35
合計ジャッジ時間 2,219 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

using ld=long double;
const ld PI=acos(-1);
const ld EPS=1e-11;

signed main(){
  int t;cin>>t;
  while(t--){
    vector<ld> x(6),y(6);
    for(int i=0;i<6;i++)cin>>x[i]>>y[i];
    vector<ld> ans(6);
    for(int i=0;i<6;i++)ans[i]=atan2(y[i],x[i]);
    for(int i=0;i<6;i++)ans[i]+=EPS;
    for(int i=0;i<6;i++)if(ans[i]<0)ans[i]=10000;
    sort(ans.begin(),ans.end());
    cout<<fixed<<setprecision(12)<<ans[0]/PI*180<<endl;
  }
}
0