結果
| 問題 |
No.1230 Hall_and_me
|
| コンテスト | |
| ユーザー |
poohbear
|
| 提出日時 | 2020-09-18 21:30:08 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 26 ms / 2,000 ms |
| コード長 | 643 bytes |
| コンパイル時間 | 1,622 ms |
| コンパイル使用メモリ | 192,468 KB |
| 最終ジャッジ日時 | 2025-01-14 16:30:11 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 36 |
ソースコード
#include <bits/stdc++.h>
#define rep(a,n) for (ll a = 0; a < (n); ++a)
using namespace std;
//using namespace atcoder;
using ll = long long;
typedef pair<ll,ll> P;
typedef pair<ll,P> PP;
typedef vector<vector<int> > Graph;
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 ll INF = 1e18;
int main(){
double p,q,r;
cin >> p >> q >> r;
double ans = 0;
double s = p+q+r;
chmax(ans,(p+q)/s);
chmax(ans,(q+r)/s);
chmax(ans,(r+p)/s);
printf("%.16lf\n",ans);
return 0;
}
poohbear