結果
| 問題 |
No.105 arcの六角ボルト
|
| コンテスト | |
| ユーザー |
Irmystp
|
| 提出日時 | 2014-12-16 23:53:12 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 872 bytes |
| コンパイル時間 | 1,410 ms |
| コンパイル使用メモリ | 160,600 KB |
| 実行使用メモリ | 6,816 KB |
| 最終ジャッジ日時 | 2024-06-11 22:03:36 |
| 合計ジャッジ時間 | 1,979 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 1 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000007;
const int MOD = 1000000007;
const double EPS = 1e-11;
const double PI = acos(-1);
typedef long long ll;
int main(){
int n;
cin >> n;
while(n--){
double a[6], b[6];
for(int i = 0; i < 6; i++){
cin >> a[i] >> b[i];
}
double left = 0, right = 50;
for(int _ = 0; _ < 250; _++){
double mid = (left + right) / 2;
double ra = mid * PI / 180.0;
double 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;
}
}
printf("%.12lf\n", left);
}
return 0;
}
Irmystp