結果
| 問題 |
No.1042 愚直大学
|
| コンテスト | |
| ユーザー |
Haa
|
| 提出日時 | 2020-05-01 21:38:27 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 542 bytes |
| コンパイル時間 | 1,958 ms |
| コンパイル使用メモリ | 165,588 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-25 00:30:05 |
| 合計ジャッジ時間 | 3,001 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 15 WA * 8 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> P;
typedef vector<ll> VI;
typedef vector<VI> VVI;
const ll MOD = 1000000007;
const ll INF = 2147483647;
const ll LINF = 9223372036854775807;
#define REP(i, n) for (int i = 0; i < n; i++)
#define ALL(v) v.begin(), v.end()
int main() {
ll p, q; cin >> p >> q;
long double ok=1, ng=INF;
while(ng-ok>0.00000001){
long double s=ok+(ng-ok)/2;
if(s*s<p+q*s*log2(s))
ok=s;
else
ng=s;
}
cout << setprecision(10) << ok << endl;
return 0;
}
Haa