結果

問題 No.105 arcの六角ボルト
コンテスト
ユーザー mamekin
提出日時 2015-01-18 10:58:02
言語 C++11
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 47 ms / 5,000 ms
コード長 846 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 506 ms
コンパイル使用メモリ 109,784 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2026-03-07 00:42:20
合計ジャッジ時間 892 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <limits>
#include <climits>
#include <cfloat>
#include <functional>
using namespace std;

const double PI = acos(-1.0);
const double EPS = 1.0e-10;

int main()
{
    int n;
    cin >> n;

    while(--n >= 0){
        double ret = DBL_MAX;
        for(int i=0; i<6; ++i){
            double x, y;
            cin >> x >> y;
            x += EPS;
            y += EPS;
            double theta = atan2(y, x);
            if(theta >= 0.0)
                ret = min(ret, theta);
        }

        printf("%.10f\n", ret / PI * 180);
    }

    return 0;
}
0