結果
| 問題 |
No.105 arcの六角ボルト
|
| コンテスト | |
| ユーザー |
koyumeishi
|
| 提出日時 | 2014-12-16 23:47:40 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 75 ms / 5,000 ms |
| コード長 | 671 bytes |
| コンパイル時間 | 620 ms |
| コンパイル使用メモリ | 77,892 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-06-11 22:03:31 |
| 合計ジャッジ時間 | 1,200 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 |
ソースコード
#include <iostream>
#include <vector>
#include <cstdio>
#include <sstream>
#include <map>
#include <string>
#include <algorithm>
#include <queue>
#include <cmath>
using namespace std;
void solve(){
vector<double> x(6);
vector<double> y(6);
vector<double> theta(6);
for(int i=0; i<6; i++){
cin >> x[i] >> y[i];
theta[i] = atan2( y[i], x[i] );
}
sort(theta.begin(), theta.end());
double ans = (*upper_bound(theta.begin(), theta.end(), 0.0) - atan2(0, 1)) * 180 / atan2(1e-18,-1);
if(ans > 50) ans -= 60;
printf("%.12f\n", ans);
}
int main(){
int T;
cin >> T;
for(int t=0; t<T; t++){
solve();
}
return 0;
}
koyumeishi