結果
| 問題 | No.1042 愚直大学 | 
| コンテスト | |
| ユーザー |  ngtkana | 
| 提出日時 | 2020-05-01 22:29:31 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 3 ms / 2,000 ms | 
| コード長 | 682 bytes | 
| コンパイル時間 | 2,454 ms | 
| コンパイル使用メモリ | 192,436 KB | 
| 最終ジャッジ日時 | 2025-01-10 05:09:59 | 
| ジャッジサーバーID (参考情報) | judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 23 | 
ソースコード
#define ENABLE_DEBUG 1
// hidden common codes{{{
#include<bits/stdc++.h>
#define ALL(v) std::begin(v),std::end(v)
using lint=long long;
using ld=long double;
template<class T> using numr=std::numeric_limits<T>;
struct input_t {
    template<class T> operator T() {
        T t;
        std::cin>>t;
        return t;
    }
} input;
#ifdef NGTKANA
#include<debug.hpp>
#else
#define DEBUG(...)(void)0
#endif
/*}}}*/
int main(){
    std::cin.tie(nullptr);
    std::ios::sync_with_stdio(false);
    ld p=input,q=input;
    ld l=1,r=1e40;
    for(lint i=0;i<400;i++){
        ld c = std::sqrt(l*r);
        (c*c - q*c*std::log2(c) - p <= 0 ? l : r) = c;
    }
    std::cout<<l<<'\n';
}
            
            
            
        