結果
問題 | No.105 arcの六角ボルト |
ユーザー | tottoripaper |
提出日時 | 2015-03-03 21:48:00 |
言語 | C++11 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 25 ms / 5,000 ms |
コード長 | 503 bytes |
コンパイル時間 | 384 ms |
コンパイル使用メモリ | 51,480 KB |
実行使用メモリ | 4,376 KB |
最終ジャッジ日時 | 2023-09-06 06:37:19 |
合計ジャッジ時間 | 933 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
(要ログイン)
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:25:15: warning: ‘theta’ may be used uninitialized in this function [-Wmaybe-uninitialized] printf("%.10f\n", theta); ~~~~~~^~~~~~~~~~~~~~~~~~
ソースコード
#include <cstdio> #include <cmath> #include <tuple> typedef std::pair<double,double> P; const double EPS = 1e-8; int main(){ int T; scanf("%d", &T); while(T--){ double theta; for(int i=0;i<6;i++){ double x, y; scanf("%lf %lf", &x, &y); double t = asin(y) * 360.0 / (2.0 * M_PI); if(x > -EPS && - EPS < t && t < 50.0 + EPS){ theta = t; } } printf("%.10f\n", theta); } }