結果
| 問題 |
No.105 arcの六角ボルト
|
| コンテスト | |
| ユーザー |
LayCurse
|
| 提出日時 | 2014-11-27 14:06:32 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 26 ms / 5,000 ms |
| コード長 | 475 bytes |
| コンパイル時間 | 1,574 ms |
| コンパイル使用メモリ | 154,752 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2025-01-03 09:14:38 |
| 合計ジャッジ時間 | 2,128 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:13:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
13 | scanf("%d",&T);
| ~~~~~^~~~~~~~~
main.cpp:17:12: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
17 | scanf("%lf%lf",&X,&Y);
| ~~~~~^~~~~~~~~~~~~~~~
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
int main(){
int i, j, k;
int T;
double X, Y, th, pi = acos(0)*2;
double res;
scanf("%d",&T);
while(T--){
res = 1e10;
rep(i,6){
scanf("%lf%lf",&X,&Y);
th = atan2(Y,X);
if(th < -1e-9) continue;
res = min(res, th);
}
res = res * 180 / pi;
printf("%.16f\n",res);
}
return 0;
}
LayCurse