結果
| 問題 | No.105 arcの六角ボルト |
| コンテスト | |
| ユーザー |
tottoripaper
|
| 提出日時 | 2015-03-03 21:48:00 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 16 ms / 5,000 ms |
| + 471µs | |
| コード長 | 503 bytes |
| 記録 | |
| コンパイル時間 | 184 ms |
| コンパイル使用メモリ | 56,732 KB |
| 実行使用メモリ | 9,808 KB |
| 最終ジャッジ日時 | 2026-10-15 05:09:24 |
| 合計ジャッジ時間 | 1,266 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:25:15: warning: 'theta' may be used uninitialized [-Wmaybe-uninitialized]
25 | printf("%.10f\n", theta);
| ~~~~~~^~~~~~~~~~~~~~~~~~
main.cpp:14:16: note: 'theta' was declared here
14 | double 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);
}
}
tottoripaper