結果
| 問題 |
No.1042 愚直大学
|
| コンテスト | |
| ユーザー |
queee
|
| 提出日時 | 2020-05-01 21:49:59 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 499 bytes |
| コンパイル時間 | 816 ms |
| コンパイル使用メモリ | 82,192 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-12-25 03:19:13 |
| 合計ジャッジ時間 | 25,780 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 15 TLE * 8 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <cmath>
#include <iomanip>
using namespace std; using ll=long long; const int INF=1e9;
typedef pair<int,int> P;
int main() {
long double p,q; cin>>p>>q;
long double ok=0, ng=1e12;
while(ng - ok > 1e-10) {
long double n = (ok + ng) / 2.0;
//cout << n << " " << p + q * log2(n) << endl;
if (n * n <= p + q * n * log2(n)) ok = n;
else ng = n;
}
cout<<fixed<<setprecision(20)<<ok<<endl;
}
queee