結果

問題 No.105 arcの六角ボルト
ユーザー itezpaceitezpace
提出日時 2016-07-31 09:57:14
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 628 bytes
コンパイル時間 660 ms
コンパイル使用メモリ 69,184 KB
実行使用メモリ 6,816 KB
最終ジャッジ日時 2024-04-24 13:17:58
合計ジャッジ時間 1,306 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <cmath>
#include <iomanip>
using namespace std;
typedef long long ll;
static const double pi = 3.14159265358979265358979;
int main(){
  int t;
  double x,y;
  cin>>t;
  double a,b,c,d,e;
  a=1/2;
  b=sqrt(3)/2;
  ll z;
  b*=1e12;
  z=b;
  b=z/1e12;
  for(int i=0; i<t; ++i){
    for(int j=0; j<6; ++j){
      cin>>x>>y;
      x*=1e12;
      z=x;
      x=z/1e12;
      y*=1e12;
      z=y;
      y=z/1e12;
      if(x<=1 && x>a && y>=0 && y<b){
        c=y;
        d=c/1;
      }
    }
    e=asin(d);
    e*=(180/pi);
    cout<<fixed<<setprecision(12)<<e<<endl;
  }
  return 0;
}
0