結果
問題 | No.1319 最強とんがりコーン |
ユーザー |
|
提出日時 | 2020-12-17 03:02:38 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 378 bytes |
コンパイル時間 | 634 ms |
コンパイル使用メモリ | 74,000 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-20 06:06:20 |
合計ジャッジ時間 | 2,333 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 70 |
コンパイルメッセージ
main.cpp:11:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 11 | main() | ^~~~
ソースコード
#include<iostream> #include<iomanip> #include<cmath> using namespace std; long double R,H,D,A; long double f(long double x) { long double sq=sqrt(4-(A/x)*(A/x)); return A*A*log(sqrt(4*x*x-A*A)+2*x)/8-x*x/3*sq-A*A/24*log(x*(sq+2))+2*x*x*x*acos(A/(2*x))/(3*A); } main() { cin>>R>>H>>D; A=D*H/R; cout<<fixed<<setprecision(16)<<D*D/A*(f(H)+A*A/24*log(A)-A*A*log(A)/8)<<endl; }