結果

問題 No.105 arcの六角ボルト
ユーザー tkzw_21tkzw_21
提出日時 2014-12-17 00:29:39
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 63 ms / 5,000 ms
コード長 603 bytes
コンパイル時間 717 ms
コンパイル使用メモリ 62,200 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-02 15:33:20
合計ジャッジ時間 1,361 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <cmath>
#include <vector>
#define PI 3.141592653589793
#define double long double
using namespace std;

const double EPS = 1e-10;

int main(void){
	int n;
	
	cin >> n;
	vector<double> ret(n),a,b;
	for(int i=0;i<n;i++){
		double x1,y1=51.;
		for(int j=0;j<6;j++){
			double x,y;
			cin >> x >> y;
			if(0.-EPS <= y && y < sin((50+EPS)*PI/180.) && cos((50+EPS)*PI/180.) < x && x <= 1. + EPS && y1 > y){
				x1 = x;
				y1 = y;
			}
		}
		ret[i] = asin(y1) * 180. / PI;
	}

	for(int i=0;i<n;i++){
		printf("%.10Lf\n",ret[i]);
	}

	
	return 0;
}
0