結果

問題 No.105 arcの六角ボルト
ユーザー tnakao0123tnakao0123
提出日時 2016-03-16 21:30:00
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 1,007 bytes
コンパイル時間 695 ms
コンパイル使用メモリ 84,504 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-04-08 16:37:25
合計ジャッジ時間 1,342 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

/* -*- coding: utf-8 -*-
 *
 * 105.cc: No.105 arcの六角ボルト - yukicoder
 */

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
 
using namespace std;

/* constant */

const double PI = acos(-1.0);
const double MIN_TH = 0.0;
const double MAX_TH = 50.0 * PI / 180;

/* typedef */

/* global variables */

/* subroutines */

/* main */

int main() {
  //printf("MIN_TH=%lf, MAX_TH=%lf\n", MIN_TH, MAX_TH);
  
  int tn;
  cin >> tn;

  while (tn--) {
    double ans;
    for (int i = 0; i < 6; i++) {
      double x, y;
      cin >> x >> y;
      double th = atan2(y, x);
      if (MIN_TH <= th && th < MAX_TH) {
	//printf("%d: (%lf,%lf)=%lf\n", i, x, y, th);
	ans = th * 180 / PI;
      }
    }

    printf("%.12lf\n", ans);
  }

  return 0;
}
0