結果

問題 No.105 arcの六角ボルト
コンテスト
ユーザー satanic
提出日時 2016-04-23 14:43:12
言語 C++11
(gcc 15.3.0 + boost 1.92.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 18 ms / 5,000 ms
+ 73µs
コード長 607 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 358 ms
コンパイル使用メモリ 86,556 KB
実行使用メモリ 6,528 KB
最終ジャッジ日時 2026-09-10 05:20:09
合計ジャッジ時間 1,628 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <iostream>
#include <cmath>
#include <iomanip>

int main(){
    std::ios::sync_with_stdio(false);
    std::cin.tie(0);
    
    int t;
    std::cin >> t;
    for(int i=0; i<t; ++i){
        bool foundedF = false;
        for(int j=0; j<6; ++j){
            double x, y;
            std::cin >> x >> y;
            y+=1/1e12;
            if(!foundedF && x>0 && y>0 && y<x*std::sqrt(3)){
                std::cout << std::fixed << std::setprecision(7) << std::fmod(std::round(std::atan(y/x)*180*1e7/M_PI)/1e7, 60) << "\n";
                foundedF=true;
            }
        }
    }

    return 0;
}
0