結果

問題 No.105 arcの六角ボルト
ユーザー tkmst201tkmst201
提出日時 2017-04-28 21:36:38
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 26 ms / 5,000 ms
コード長 1,007 bytes
コンパイル時間 1,341 ms
コンパイル使用メモリ 143,736 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-11 19:00:55
合計ジャッジ時間 1,879 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()

template<typename A, typename B> inline bool chmax(A &a, B b) { if (a<b) { a=b; return 1; } return 0; }
template<typename A, typename B> inline bool chmin(A &a, B b) { if (a>b) { a=b; return 1; } return 0; }

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<int, pii> P;

const ll INF = 1ll<<60;
const ll MOD = 1000000007;
const double EPS  = 1e-10;
const double PI = acos(-1);

double radToAng(double rad) {
	return rad * 180.0 / PI;
}

int main() {
	int t;
	cin >> t;
	
	while (t--) {
		
		double x[6], y[6];
		
		double ans = 50;
		
		REP(i, 6) {
			scanf("%lf %lf", x + i, y + i);
			
			if (x[i] < 0 || y[i] < 0) continue;
			
			double ang = radToAng(atan2(y[i], x[i]));
			
			chmin(ans, ang);
		}
		if (ans == 50.0) ans = 0;
		
		printf("%.15f\n", ans);
	}
	return 0;
}
0