結果

問題 No.105 arcの六角ボルト
ユーザー koyumeishikoyumeishi
提出日時 2014-12-16 23:47:40
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 67 ms / 5,000 ms
コード長 671 bytes
コンパイル時間 648 ms
コンパイル使用メモリ 77,272 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-02 15:30:34
合計ジャッジ時間 1,193 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#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