結果
| 問題 |
No.105 arcの六角ボルト
|
| コンテスト | |
| ユーザー |
Irmystp
|
| 提出日時 | 2014-12-16 23:57:13 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 801 bytes |
| コンパイル時間 | 1,758 ms |
| コンパイル使用メモリ | 159,204 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-06-11 22:04:23 |
| 合計ジャッジ時間 | 6,126 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 1 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long double ld;
const ld EPS = 1e-14;
const ld PI = acos(-1);
int main(){
int n;
cin >> n;
while(n--){
ld a[6], b[6];
for(int i = 0; i < 6; i++){
cin >> a[i] >> b[i];
}
ld left = 0, right = 50;
for(int _ = 0; _ < 5000; _++){
ld mid = (left + right) / 2;
ld ra = mid * PI / 180.0;
ld x = cos(ra);
for(int i = 0; i < 6; i++){
if(a[i] < 0.5 || b[i] < 0) continue;
if(x - a[i] < -EPS) right = mid;
else if(x - a[i] > EPS) left = mid;
break;
}
}
cout << setprecision(13) << left << endl;
}
return 0;
}
Irmystp