結果

問題 No.456 Millions of Submits!
ユーザー finefine
提出日時 2016-12-11 22:38:29
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 3,050 ms / 4,500 ms
コード長 538 bytes
コンパイル時間 1,372 ms
コンパイル使用メモリ 163,460 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-05 21:51:34
合計ジャッジ時間 12,187 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 5 ms
4,376 KB
testcase_08 AC 5 ms
4,376 KB
testcase_09 AC 33 ms
4,376 KB
testcase_10 AC 33 ms
4,380 KB
testcase_11 AC 306 ms
4,376 KB
testcase_12 AC 3,050 ms
4,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int m;
	scanf("%d", &m);
	for (int i = 0; i < m; i++) {
		int a, b;
		double t;
		scanf("%d %d %lf", &a, &b, &t);
		double ok = 0.0, ng = 3e5;
		for (int j = 0; j < 50; j++) {
			double mid = (ok + ng) / 2;
			double tmp = log(mid);
			double time = 1.0;
			for (int i = 0; i < a; i++) time *= mid;
			for (int i = 0; i < b; i++) time *= tmp;
			if (time > t) ng = mid;
			else ok = mid;
		}
		printf("%.10lf\n", ok);
	}
	return 0;
}
0