結果

問題 No.105 arcの六角ボルト
コンテスト
ユーザー Unbakedbread
提出日時 2026-01-01 14:24:20
言語 C++23
(gcc 15.2.0 + boost 1.89.0)
結果
AC  
実行時間 76 ms / 5,000 ms
コード長 475 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 3,093 ms
コンパイル使用メモリ 278,552 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2026-01-01 14:24:24
合計ジャッジ時間 4,055 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
using namespace std;

int solve(void) {
	vector<double> X(6), Y(6);
	for(int i = 0; i < 6; ++i) cin >> X[i] >> Y[i];
	
	double ans = 1e9;
	for(int i = 0; i < 6; ++i) {
		double theta = atan2(Y[i], X[i]);
		if(theta < 0) theta += M_PI;
		ans = min(ans, theta * 180 / M_PI);
	}
	
	if(ans > 50) ans = 0;
	cout << ans << "\n";
	
	return 0;
}

int main(void) {
	cout << fixed << setprecision(15);
	
	int T;
	cin >> T;
	
	while(T--) solve();
	
	return 0;
}
0