結果
| 問題 |
No.948 Bomb vs Dush
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-12-11 09:45:42 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 335 bytes |
| コンパイル時間 | 754 ms |
| コンパイル使用メモリ | 73,840 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-24 07:35:14 |
| 合計ジャッジ時間 | 2,026 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 38 |
ソースコード
#include<iostream>
#include<cmath>
#include<iomanip>
using namespace std;
#define PI (2*acos(0.0))
int main(){
cout << fixed << setprecision(12);
double r, R;
cin >> r >> R;
double t = 2*PI-2*fabs(atan2(r, sqrt(R*R-r*r)));
cout << t << endl << PI*((R+r)*(R+r)-(R-r)*(R-r))*t/2/PI + PI*r*r << endl;
return 0;
}