結果
| 問題 |
No.1042 愚直大学
|
| コンテスト | |
| ユーザー |
mot
|
| 提出日時 | 2020-05-01 21:49:50 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 599 bytes |
| コンパイル時間 | 844 ms |
| コンパイル使用メモリ | 81,408 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-25 03:18:42 |
| 合計ジャッジ時間 | 3,037 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 21 WA * 2 |
ソースコード
#include<iostream>
#include<iomanip>
#include<cmath>
#include<string>
#include<vector>
#include<algorithm>
#include<map>
#include<set>
#include<queue>
#include<stack>
using namespace std;
typedef long long ll;
#define fi first
#define se second
#define mp make_pair
const int inf=1e9+7;
const ll mod=1e9+7;
int main() {
ll P, Q;
cin>>P>>Q;
double l, m, r;
l = 0;
r = P * Q;
for(int i=0;i<1000000;++i){
m = (l+r)/2;
if(P+Q*m*log2(m)-m*m>0){
l = m;
}
else{
r = m;
}
}
cout<<setprecision(20)<<l<<endl;
}
mot