結果

問題 No.105 arcの六角ボルト
ユーザー 0w10w1
提出日時 2016-11-29 15:39:28
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 70 ms / 5,000 ms
コード長 502 bytes
コンパイル時間 1,442 ms
コンパイル使用メモリ 164,776 KB
実行使用メモリ 4,376 KB
最終ジャッジ日時 2023-08-18 09:41:12
合計ジャッジ時間 1,994 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

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

const double EPS = 1e-8;

signed main(){
  int T; cin >> T;
  for( int kase = 0; kase < T; ++kase ){
    double ans = 1e9;
    for( int i = 0; i < 6; ++i ){
      double X, Y; cin >> X >> Y;
      if( fabs( X ) < EPS ) continue;
      double rad = atan( Y / X );
      double deg = rad * 180.0 / acos( -1.0 );
      if( deg + EPS >= 0.0 )
        ans = min( ans, deg );
    }
    cout << fixed << setprecision( 10 ) << ans << endl;    
  }  
  return 0;
}
0