結果

問題 No.105 arcの六角ボルト
ユーザー mayoko_mayoko_
提出日時 2014-12-17 08:57:53
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 72 ms / 5,000 ms
コード長 757 bytes
コンパイル時間 1,288 ms
コンパイル使用メモリ 72,440 KB
実行使用メモリ 4,368 KB
最終ジャッジ日時 2023-09-02 18:32:28
合計ジャッジ時間 1,903 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <iostream>
#include <utility>
#include <set>
#include <cctype>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cmath>

#define INF 1000000000

using namespace std;
typedef long long ll;

int main(void) {
    int T;
    double EPS = 1e-6;
    cin >> T;
    while (T--) {
        double x[6];
        double y[6];
        double ret = 0;
        for (int i = 0; i < 6; i++) {
            cin >> x[i] >> y[i];
            double ans = atan2(y[i], x[i]) / M_PI * 180;
            if (0-EPS <= ans && ans+EPS <= 50) ret = ans;
        }
        printf("%.16lf\n", ret);
    }
    return 0;
}
0