結果

問題 No.105 arcの六角ボルト
コンテスト
ユーザー koyumeishi
提出日時 2014-12-16 23:47:40
言語 C++11
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 87 ms / 5,000 ms
コード長 671 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 748 ms
コンパイル使用メモリ 103,752 KB
実行使用メモリ 7,712 KB
最終ジャッジ日時 2026-03-05 03:38:09
合計ジャッジ時間 1,348 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#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;
}
0