結果

問題 No.3151 natural math of inscribed circle
ユーザー sai
提出日時 2025-05-24 01:25:34
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 363 bytes
コンパイル時間 2,687 ms
コンパイル使用メモリ 275,476 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2025-06-20 03:03:06
合計ジャッジ時間 3,763 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 41
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  long double a, b, c;
  std::cin >> a >> b >> c;
  auto S = [&]() -> long double {
    long double s = (a + b + c) / 2;
    return sqrt(s * (s - a) * (s - b) * (s - c));
  };
  std::cout << std::fixed << std::setprecision(16) << 2 * S() / (a + b + c) << '\n';
}
0