結果

問題 No.456 Millions of Submits!
ユーザー olphe
提出日時 2016-12-07 23:16:13
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 578 bytes
コンパイル時間 918 ms
コンパイル使用メモリ 79,212 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-06-23 03:42:46
合計ジャッジ時間 8,835 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 7 WA * 5 TLE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "iostream"
#include "iomanip"
#include "math.h"
#include "algorithm"
#include "functional"

using namespace std;

const double dis = 0.0000000001;

int m;
double a, b, t;
double l,r;
double mid;

int main() {
	cin >> m;
	for (int i = 0; i < m; i++) {
		cin >> a >> b >> t;
		l = 0;
		r = 100;
		while ((r * 1000000 - l * 1000000) > dis * 1000000) {
			mid = (l + r) / 2;
			if (pow(mid, a)*pow(log(mid), b) > t) {
				r = mid;
			}
			else {
				l = mid;
			}
			//cout << setprecision(15) << mid << "\n";
		}
		cout << setprecision(15) << mid << "\n";
	}
	return 0;
}
0