結果
| 問題 |
No.948 Bomb vs Dush
|
| コンテスト | |
| ユーザー |
risujiroh
|
| 提出日時 | 2019-12-11 00:09:40 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 421 bytes |
| コンパイル時間 | 1,663 ms |
| コンパイル使用メモリ | 166,780 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-24 06:20:39 |
| 合計ジャッジ時間 | 2,554 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 38 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
constexpr double pi = acos(-1);
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
double r, R;
cin >> r >> R;
cout << fixed << setprecision(15) << 2 * pi - asin(r / R) * 2 << '\n';
auto sq = [](double x) { return x * x; };
double res = (sq(R + r) - sq(R - r)) * (pi - asin(r / R)) + pi * r * r;
cout << fixed << setprecision(15) << res << '\n';
}
risujiroh