結果
| 問題 | No.1042 愚直大学 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2020-08-29 10:42:55 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                TLE
                                 
                             | 
| 実行時間 | - | 
| コード長 | 681 bytes | 
| コンパイル時間 | 1,678 ms | 
| コンパイル使用メモリ | 166,724 KB | 
| 実行使用メモリ | 13,768 KB | 
| 最終ジャッジ日時 | 2024-11-14 05:26:04 | 
| 合計ジャッジ時間 | 26,627 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 15 TLE * 8 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
#define ll long long
#define ld long double
#define INF 1000000000000000000
typedef pair<ll, ll> pll;
typedef pair<int, int> pint;
ld P, Q;
bool isOK(ld key) { return P + Q * key * log2(key) >= key * key; }
int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> P >> Q;
    ld ok = 0.0, ng = 1000000000000000000.0;
    while (abs(ok - ng) > 1e-10) {
        ld mid = (ok + ng) / 2;
        if (isOK(mid))
            ok = mid;
        else
            ng = mid;
    }
    cout << fixed << setprecision(10) << ok << endl;
}
            
            
            
        