結果
| 問題 |
No.105 arcの六角ボルト
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-10-04 18:43:42 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 804 bytes |
| コンパイル時間 | 604 ms |
| コンパイル使用メモリ | 73,688 KB |
| 実行使用メモリ | 6,816 KB |
| 最終ジャッジ日時 | 2024-07-19 19:35:07 |
| 合計ジャッジ時間 | 1,142 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 1 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:38:18: warning: ‘x’ may be used uninitialized in this function [-Wmaybe-uninitialized]
38 | e[i] = acos(x);
| ~~~~^~~
ソースコード
#define _USE_MATH_DEFINES
#include <cmath>
#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 x;
double e[5005];
int n;
cin >> n;
rep(i,n) {
rep(j,6) {
cin >> tmp_x >> tmp_y;
if(0 <=tmp_y && tmp_y <= sin((double)tmp_x)
&& tmp_x >= 0) x = tmp_x;
}
e[i] = acos(x);
}
rep(i,n) printf("%.9f\n",e[i]*180/M_PI);
return 0;
}