結果
問題 | No.105 arcの六角ボルト |
ユーザー | xuzijian629 |
提出日時 | 2018-10-29 18:48:45 |
言語 | C++17 (gcc 12.3.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 41 ms / 5,000 ms |
コード長 | 697 bytes |
コンパイル時間 | 1,896 ms |
コンパイル使用メモリ | 197,952 KB |
実行使用メモリ | 4,380 KB |
最終ジャッジ日時 | 2023-08-12 08:45:24 |
合計ジャッジ時間 | 2,485 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
ソースコード
#include <bits/stdc++.h> using namespace std; using i64 = int64_t; using vi = vector<i64>; using vvi = vector<vi>; void solve() { double ans = 60; double X = -1, Y = -1; for (int i = 0; i < 6; i++) { double x, y; cin >> x >> y; if (x > 0.5 - 1e-11 && -1e-11 < y && y < 1) { X = x, Y = y; ans = min(ans, abs(atan(Y / X) * 180 / acos(-1))); } } assert(X != -1 && Y != -1 && ans < 50); cout << ans << endl; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); cout.setf(ios::fixed); cout.precision(10); int t; cin >> t; while (t--) { solve(); } }