結果
| 問題 |
No.105 arcの六角ボルト
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-10-04 18:52:01 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 809 bytes |
| コンパイル時間 | 908 ms |
| コンパイル使用メモリ | 61,732 KB |
| 最終ジャッジ日時 | 2024-11-14 19:17:56 |
| 合計ジャッジ時間 | 1,289 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:35:37: error: ‘M_PI’ was not declared in this scope
35 | tmp_y <= sin((double)53*M_PI/180)
| ^~~~
main.cpp:35:22: error: ‘sin’ was not declared in this scope
35 | tmp_y <= sin((double)53*M_PI/180)
| ^~~
main.cpp:38:14: error: ‘asin’ was not declared in this scope
38 | e[i] = asin(y);
| ^~~~
main.cpp:40:38: error: ‘M_PI’ was not declared in this scope
40 | rep(i,n) printf("%.9f\n",e[i]*180/M_PI);
| ^~~~
ソースコード
#define _USE_MATH_DEFINES
#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <algorithm>
#include <sstream>
#include <map>
#include <set>
#include <cstdio>
using namespace std;
#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
/* ここからが本編 */
/* */
/* 入力開始! */
/* 入力終了! */
int main(void)
{
int i,j;
double tmp_x,tmp_y;
double y;
double e[5005];
int n;
cin >> n;
rep(i,n) {
rep(j,6) {
cin >> tmp_x >> tmp_y;
if(-0.1 <=tmp_y &&
tmp_y <= sin((double)53*M_PI/180)
&& tmp_x >= 0) y = tmp_y;
}
e[i] = asin(y);
}
rep(i,n) printf("%.9f\n",e[i]*180/M_PI);
return 0;
}