結果
| 問題 |
No.105 arcの六角ボルト
|
| コンテスト | |
| ユーザー |
IL_msta
|
| 提出日時 | 2015-07-01 09:46:31 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 33 ms / 5,000 ms |
| コード長 | 1,131 bytes |
| コンパイル時間 | 583 ms |
| コンパイル使用メモリ | 84,728 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-07-07 21:39:27 |
| 合計ジャッジ時間 | 952 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 |
ソースコード
#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 ans = -1;
LD tans;
bool bans = false;
LD kk = 360.0/(2.0*M_PI);
LD s50 = 50.0 * 2.0*M_PI/360.0;
LD dy = 0.000000000001;
for(int Loop=0;Loop<T;++Loop){
ans = -1;
bans = false;
rep(i,6){
cin>>X[i]>>Y[i];
if(Y[i] > -dy && X[i] >= 1/2)
{
tans = atan2(Y[i],X[i]);
if( bans == false){
ans = tans;
bans = true;
}
else{
if(abs(ans)>abs(tans)){
ans = tans;
}
}
}
}
ansLD[Loop] = ans*kk;
}
rep(i,T){
P( ansLD[i] );
}
return 0;
}
IL_msta