結果

問題 No.105 arcの六角ボルト
ユーザー le_panda_noirle_panda_noir
提出日時 2020-07-25 13:09:22
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 71 ms / 5,000 ms
コード長 1,823 bytes
コンパイル時間 924 ms
コンパイル使用メモリ 103,296 KB
実行使用メモリ 4,376 KB
最終ジャッジ日時 2023-09-09 10:30:03
合計ジャッジ時間 1,511 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <cmath>
#include <iomanip>

using namespace std;
using ll = long long;
using vi = vector<int>;

#define in(v) v; cin >> v;
void ins() {}
template<class T,class... Rest>void ins(T& v,Rest&... rest){cin>>v;ins(rest...);}

#define rep(i,n) for(int i=0,_i=(n);i<_i;++i)
#define rrep(i,n) for(long long i=(n);i>=0;--i)
#define all(f,c,...) (([&](decltype((c)) cccc) { return (f)(begin(cccc), end(cccc), ## __VA_ARGS__); })(c))

// === debug ===
template<class T>ostream& operator<<(ostream& os,const vector<T>& vec){os<<"{";for(size_t i=0;i<vec.size();++i)os<<(i?", ":"")<<vec[i];os<<"}";return os;}
ostream& operator<<(ostream& os,const vector<char>&v){for(size_t i=0;i<v.size();++i)os<<v[i];return os;}
template<class T1,class T2>ostream& operator<<(ostream& os,const pair<T1,T2>& rhs){os<<"("<<rhs.first<<", "<<rhs.second<<")";return os;}

#ifdef LOCAL
void debug() {cerr << "\n";}
template<class First> void debug(const First& first) {cerr<<first<<"\n";}
template<class First, class... Rest> void debug(const First& first, const Rest&... rest) {cerr<<first<<",";debug(rest...);}
void debug2() {cerr << "\n";}
template<class First> void debug2(const First& first) {cerr<<first<<" ";}
template<class First, class... Rest> void debug2(const First& first, const Rest&... rest) {cerr<<first<<" ";debug2(rest...);}
#else
#define debug(...) 42
#define debug2(...) 42
#endif
// === end ===

int main() {
  int N;
  ins(N);

  rep(i, N) {
    double x[6], y[6];
    rep(j, 6) {
      cin >> x[j] >> y[j];
      double theta = atan2(y[j], x[j]);
      double deg = 360 * theta / (2 * M_PI);
      if (50 > deg && deg > -1e-9) {
        cout << fixed << setprecision(15) << deg << endl;
      }
    }
  }

  return 0;
}
0