結果
| 問題 |
No.1230 Hall_and_me
|
| コンテスト | |
| ユーザー |
merom686
|
| 提出日時 | 2020-09-18 23:00:53 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 463 bytes |
| コンパイル時間 | 801 ms |
| コンパイル使用メモリ | 90,476 KB |
| 最終ジャッジ日時 | 2025-01-14 17:43:34 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 36 |
ソースコード
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <cmath>
using namespace std;
using ll = long long;
int main() {
int s = 0, p[3];
for (int i = 0; i < 3; i++) {
cin >> p[i];
s += p[i];
}
double r = 0;
for (int i = 0; i < 3; i++) {
double t = (double)p[i] / s;
r = max(r, max(t, 1 - t));
}
printf("%.12f\n", r);
return 0;
}
merom686