結果

問題 No.105 arcの六角ボルト
ユーザー IL_mstaIL_msta
提出日時 2015-07-01 08:40:00
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 940 bytes
コンパイル時間 672 ms
コンパイル使用メモリ 84,992 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-22 04:56:32
合計ジャッジ時間 1,166 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#define _USE_MATH_DEFINES

#include <iostream>
#include <iomanip>

#include <algorithm>
#include <cmath>

#include <string>
#include <list>
#include <queue>
#include <vector>
#include <complex>
#include <set>

/////////
#define REP(i, x, n) for(int i = x; i < n; i++)
#define rep(i,n) REP(i,0,n)
#define P(p) cout<<(p)<<endl;
/////////
typedef long long LL;
typedef long double LD;
/////////
using namespace::std;
/////////
LD ansLD[5000];
int main(void){
    std::cin.tie(0); 
    std::ios::sync_with_stdio(false);
    std::cout << std::fixed;//
    cout << setprecision(7);//
    
    int T;
	cin>>T;

	LD X[6],Y[6];
	LD X0,Y0;
	LD s50 = 2.0*M_PI*50.0/360;
	for(int Loop=0;Loop<T;++Loop){
		rep(i,6){
			cin>>X[i]>>Y[i];
			if(0<=Y[i] && Y[i] <= sin(s50) &&
				cos(s50) <= X[i]){
				X0 = X[i];
				Y0 = Y[i];
			}
		}
		LD ans = atan2(Y0,X0);
		LD kk = 180/M_PI;
		ansLD[Loop] = ans*kk;
	}
	rep(i,T){
		P( ansLD[i] );
	}
    return 0;
}
0