結果

問題 No.105 arcの六角ボルト
ユーザー h_nosonh_noson
提出日時 2016-02-26 16:04:47
言語 C++11
(gcc 11.4.0)
結果
CE  
(最新)
AC  
(最初)
実行時間 -
コード長 559 bytes
コンパイル時間 443 ms
コンパイル使用メモリ 61,624 KB
最終ジャッジ日時 2023-10-23 20:18:07
合計ジャッジ時間 942 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。

コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:23:21: error: ‘atan2’ was not declared in this scope
   23 |             cout << atan2(abs(y),x)*180/M_PI << endl;
      |                     ^~~~~
main.cpp:23:41: error: ‘M_PI’ was not declared in this scope
   23 |             cout << atan2(abs(y),x)*180/M_PI << endl;
      |                                         ^~~~

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
using namespace std;

#define RREP(i,s,e) for (i = e-1; i >= s; i--)
#define rrep(i,n) RREP(i,0,n)
#define REP(i,s,e) for (i = s; i < e; i++)
#define rep(i,n) REP(i,0,n)
#define INF 1e8

typedef long long ll;

int main() {
    int i, j, t;
    cin >> t;
    cout << fixed << setprecision(7);
    rep (i,t) rep (j,6) {
        double x, y;
        cin >> x >> y;
        if (y+1e-11 >= 0 && x-1e-11 > 0.5)
            cout << atan2(abs(y),x)*180/M_PI << endl;
    }
    return 0;
}
0