結果

問題 No.1230 Hall_and_me
ユーザー Lilianae
提出日時 2020-09-18 21:58:30
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 894 bytes
コンパイル時間 1,346 ms
コンパイル使用メモリ 166,756 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-22 09:30:52
合計ジャッジ時間 2,331 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 14 WA * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const long long INF = 1e18;
# define len(x) ((int)(x).size())
# define rep(i, n) for(int i=0, i##_len=(n); i<i##_len; ++i)
# define reps(i, n) for(int i=1, i##_len=(n); i<=i##_len; ++i)
# define rrep(i, n) for(int i=((int)(n)-1); i>=0; --i)
# define rreps(i, n) for(int i=((int)(n)); i>0; --i)
# define foreps(i, m, n) for(int i = m;i < n;i++)
# define ALL(x) (x).begin(), (x).end()
# define rall(x) (x).rbegin(), (x).rend()
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; }

int main() {
    cout << fixed << setprecision(10);
    ld P, Q, R; cin >> P >> Q >> R;
    ld Pn = P / (P + Q + R), Rn = R / (P + Q + R), Qn = Q / (P + Q + R);
    cout << max(Pn, Rn + Qn) << endl;
}
0