結果
| 問題 | No.105 arcの六角ボルト |
| コンテスト | |
| ユーザー |
tottoripaper
|
| 提出日時 | 2015-03-03 21:48:00 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 15 ms / 5,000 ms |
| コード長 | 503 bytes |
| 記録 | |
| コンパイル時間 | 316 ms |
| コンパイル使用メモリ | 57,256 KB |
| 実行使用メモリ | 7,840 KB |
| 最終ジャッジ日時 | 2026-03-09 11:16:58 |
| 合計ジャッジ時間 | 648 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 |
コンパイルメッセージ
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