結果

問題 No.3151 natural math of inscribed circle
ユーザー hen
提出日時 2025-05-20 22:04:26
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 803 bytes
コンパイル時間 1,318 ms
コンパイル使用メモリ 161,276 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2025-06-20 03:00:25
合計ジャッジ時間 2,205 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 41
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i< (int)(n); i++)
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
ll INF = 2e18;
#define Yes cout << "Yes" << endl
#define No cout << "No" << endl
#define YN {cout<<"Yes"<<endl;}else{cout<<"No"<<endl;} // true → Yes false → No

int main() {
   /* ll a,b; cin>>a>>b;
    for(int i=1; i<10000; i++) {
        ll t = (a^i);
        if(t==b) {
            cout << i << endl;
            return 0;
        }
    } */
   cout << fixed << setprecision(20);
   long double a,b,c; cin>>a>>b>>c;
   long double costheta = (b*b+c*c-a*a)/(2*b*c);
   long double sintheta = sqrt(1-(costheta*costheta));
   long double S = b*c*sintheta*0.5;
   long double r;
   r = 2*S/((a+b+c));
   cout << r << endl;
}
0