結果

問題 No.1230 Hall_and_me
ユーザー abc3
提出日時 2020-09-18 22:00:51
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 599 bytes
コンパイル時間 3,276 ms
コンパイル使用メモリ 196,076 KB
最終ジャッジ日時 2025-01-14 17:10:53
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 3 WA * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#include <math.h>
#include <iomanip>
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const int INF=1001001001;
const int mod=1e9+7;

int main(){
  vector<double>t(3);
  cin>>t[0]>>t[1]>>t[2];
  sort(t.begin(),t.end());
  if(t[0]==0&&t[1]==0){cout<<1<<endl;return 0;}
  double x=t[2]/(t[0]+t[1]+t[2]);
  double y=t[1]/(t[0]+t[1]+t[2]);
  cout<<fixed<<setprecision(10)<<1-x<<endl;
  return 0;                       
}
0