結果

問題 No.105 arcの六角ボルト
ユーザー naimonon77naimonon77
提出日時 2015-10-04 18:43:42
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 804 bytes
コンパイル時間 508 ms
コンパイル使用メモリ 70,824 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-27 02:01:45
合計ジャッジ時間 1,100 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:38:18: warning: ‘x’ may be used uninitialized in this function [-Wmaybe-uninitialized]
       e[i] = acos(x);
              ~~~~^~~

ソースコード

diff #

#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;
}
0