結果
問題 | No.105 arcの六角ボルト |
ユーザー |
![]() |
提出日時 | 2020-07-25 13:09:22 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 82 ms / 5,000 ms |
コード長 | 1,823 bytes |
コンパイル時間 | 952 ms |
コンパイル使用メモリ | 103,972 KB |
最終ジャッジ日時 | 2025-01-12 05:24:39 |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 |
ソースコード
#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<<"}";returnos;}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 LOCALvoid 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;}