結果
| 問題 |
No.3151 natural math of inscribed circle
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-05-20 22:10:45 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 1,643 bytes |
| コンパイル時間 | 2,056 ms |
| コンパイル使用メモリ | 193,332 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2025-06-20 03:00:32 |
| 合計ジャッジ時間 | 3,285 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 41 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define mod99 998244353
#define endl "\n"
#define rep(i,n) for (ll i = 0; i < (ll)(n); ++i)
#define prep(i,a,n) for (ll i = a; i < n; ++i)
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(), a.rend()
#define si(x) ((ll)(x).size())
#define YN(bool) if(bool){cout<<"YES"<<endl;}else{cout<<"NO"<<endl;}
#define yn(bool) if(bool){cout<<"Yes"<<endl;}else{cout<<"No"<<endl;}
#define PRE(x) cout << fixed << setprecision(x)
#define Yes cout << "Yes\n"
#define No cout << "No\n"
#define YES cout << "YES\n"
#define NO cout << "NO\n"
template <typename T> inline T gcd(T a,T b) {return (b==0)?a:gcd(b,a%b);}
template <typename T> inline T lcm(T a, T b) {return a/gcd(a,b)*b;}
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
#define sq(x) ((x)*(x))
#define cube(x) ((x)*(x)*(x))
const ld PI=3.141592653589793238462643383279;
const ld EPS=0.00000001;
const ll INF=1000000000000000000LL;
//string ABC = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
//string abc = "abcdefghijklmnopqrstuvwxyz";
bool issub(string s,string t){
ll i=0;
for(char c:t){
if(i<si(s)&&s[i]==c) i++;
}
return i==si(s);
}
bool isprime(ll N){
if(N<2) return false;
for(ll i=2; i*i<=N; i++) if(N%i==0) return false;
return true;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
ld a, b, c;cin >> a >> b >> c;
ld s = (a+b+c)*1.0/2.0;
ld S = sqrt(s*(s-a)*(s-b)*(s-c));
ld ans = 2*S/((a+b+c)*1.0);
PRE(15) << ans << endl;
}