結果
問題 | No.89 どんどんドーナツどーんといこう! |
ユーザー |
![]() |
提出日時 | 2019-05-01 10:57:14 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 1,534 bytes |
コンパイル時間 | 1,666 ms |
コンパイル使用メモリ | 164,420 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-05 23:37:39 |
合計ジャッジ時間 | 1,982 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 9 |
ソースコード
#define _CRT_SECURE_NO_WARNINGS#include "bits/stdc++.h"using namespace std;#define rep(i, n) for(int i=0; i<(n); ++i)#define FOR(i, m, n) for(int i=(m); i<(n); ++i)#define sz(x) ((int)(x).size())#define all(x) (x).begin(),(x).end()#define mp make_pair#define pb push_back#define dump(x) cerr << #x << " = " << (x) << endl;using LL=long long;using VI=vector<int>;using VL=vector<long long>;using VS=vector<string>;using VVI=vector<vector<int>>;using PII=pair<int, int>;const int inf = (int)1e9;const LL mod = (long long)1e9 + 7;const double pi = acos(-1.0);template<class T>void Sort(T & a) { sort(a.begin(), a.end()); }template<class T>void ReSort(T& a) { sort(a.rbegin(), a.rend()); }template<class T>void Reverse(T& a) { reverse(a.begin(), a.end()); }template<class T>void Unique(T& a) { a.erase(unique(a.begin(), a.end()), a.end()); }template<class T>auto Max(T a) { return *max_element(a.begin(), a.end()); }template<class T>auto Min(T a) { return *min_element(a.begin(), a.end()); }template<class T, class U>int Count(T a, U c) { return count(a.begin(), a.end(), c); }template<class T, class U>U Sum(T a, U init = 0) { return accumulate(a.begin(), a.end(), init); }template<class T>T Age(T a, T b) { return (a + b - 1) / b; }template<class T>T gcd(T n, T m) { return m == 0 ? n : gcd(m, n % m); }template<class T>T lcm(T n, T m) { return n / gcd(n, m) * m; }int main() {double c, r1, r2;cin >> c >> r1 >> r2;printf("%.20f\n", pow((r2 - r1) / 2, 2) * pi * ((r2 - r1) / 2 + r1) * 2 * pi * c);}