結果
| 問題 |
No.1319 最強とんがりコーン
|
| コンテスト | |
| ユーザー |
milanis48663220
|
| 提出日時 | 2020-12-16 02:32:35 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 986 bytes |
| コンパイル時間 | 1,669 ms |
| コンパイル使用メモリ | 102,156 KB |
| 最終ジャッジ日時 | 2025-01-17 01:47:25 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 70 |
ソースコード
#include <iostream>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <cassert>
#include <cmath>
#define debug_value(x) cerr << "line" << __LINE__ << ":<" << __func__ << ">:" << #x << "=" << x << endl;
#define debug(x) cerr << "line" << __LINE__ << ":<" << __func__ << ">:" << x << endl;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
using namespace std;
typedef long long ll;
double pow3(double x){ return x*x*x;}
double pow2(double x){ return x*x;}
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
cout << setprecision(10) << fixed;
double r, h, d; cin >> r >> h >> d;
double a = r-d/2.0;
double k = 1.0-a/r;
double v = (h*pow2(r)/3.0)*(
M_PI/2.0 - 2*k*sqrt(1-pow2(k)) - asin(k) + pow3(k)*acosh(1.0/k)
);
cout << 2*v << endl;
}
milanis48663220