結果

問題 No.105 arcの六角ボルト
ユーザー mamekinmamekin
提出日時 2015-01-18 10:58:02
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 69 ms / 5,000 ms
コード長 846 bytes
コンパイル時間 639 ms
コンパイル使用メモリ 87,468 KB
実行使用メモリ 4,376 KB
最終ジャッジ日時 2023-09-04 21:36:04
合計ジャッジ時間 1,348 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#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