結果
問題 | No.1230 Hall_and_me |
ユーザー |
|
提出日時 | 2020-09-18 21:35:52 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 795 bytes |
コンパイル時間 | 1,858 ms |
コンパイル使用メモリ | 170,112 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-22 09:07:04 |
合計ジャッジ時間 | 2,835 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 36 |
ソースコード
#include <bits/stdc++.h> //#include <atcoder/all> typedef unsigned long long ULLONG; typedef long long LLONG; static const LLONG MOD_NUM = 1000000007; //998244353; template<class _T> static void get(_T& a) { std::cin >> a; } template<class _T> static void get(_T& a, _T& b) { std::cin >> a >> b; } template<class _T> static void get(_T& a, _T& b, _T& c) { std::cin >> a >> b >> c; } template <class _T> static _T tp_abs(_T a) { if (a < (_T)0) { a *= (_T)-1; } return a; } static void A(); int main() { A(); fflush(stdout); return 0; } static void A() { double P, Q, R; get(P, Q, R); double ttl = P + Q + R; std::vector<double> p(3); p[0] = P / ttl; p[1] = Q / ttl; p[2] = R / ttl; std::sort(p.begin(), p.end()); double ans = p[1] + p[2]; printf("%.10lf\n", ans); }