結果
| 問題 | No.948 Bomb vs Dush |
| コンテスト | |
| ユーザー |
square1001
|
| 提出日時 | 2020-01-30 19:11:01 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 360 bytes |
| コンパイル時間 | 573 ms |
| コンパイル使用メモリ | 69,888 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-16 03:47:54 |
| 合計ジャッジ時間 | 1,910 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | WA * 38 |
ソースコード
#include <cmath>
#include <iostream>
using namespace std;
const double pi = acos(-1.0);
int main() {
double r, R;
cin >> r >> R;
double ang = asin(r / R);
double t = 2 * pi - 2 * ang;
double d = R - r;
double area = ((R + d) * (R + d) - (R - d) * (R - d)) * t / 2 + d * d * pi;
cout.precision(15);
cout << t << endl;
cout << area << endl;
return 0;
}
square1001