結果

問題 No.948 Bomb vs Dush
ユーザー coco18000
提出日時 2019-12-11 23:08:12
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 567 bytes
コンパイル時間 1,594 ms
コンパイル使用メモリ 165,660 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-24 08:06:47
合計ジャッジ時間 2,699 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 38
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;
typedef pair<ll, ll> pll;

#define FOR(i, n, m) for(ll (i)=(m);(i)<(n);++(i))
#define REP(i, n) FOR(i,n,0)
#define OF64 std::setprecision(30)

const ll MOD = 1000000007;
const ll INF = (ll) 1e15;

int main() {
    double r, R;
    cin >> r >> R;
    double theta = asin(r / R) * 2;

    double ans = ((R + r) * (R + r) - (R - r) * (R - r)) * M_PI * ((2 * M_PI - theta) / (2 * M_PI)) + r * r * M_PI;
    cout << OF64 << 2 * M_PI - theta << endl;
    cout << OF64 << ans << endl;
    return 0;
}
0