結果

問題 No.456 Millions of Submits!
ユーザー olpheolphe
提出日時 2016-12-07 23:32:48
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 737 bytes
コンパイル時間 3,504 ms
コンパイル使用メモリ 77,372 KB
実行使用メモリ 8,240 KB
最終ジャッジ日時 2023-09-05 07:47:39
合計ジャッジ時間 10,092 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

using namespace std;

int m;
double a, b, t;
double l,r;
double mid;
int start_t;
int end_t;
int num;

int main() {
	cin >> m;
	//start_t = clock();
	for (int i = 0; i < m; i++) {
		cin >> a >> b >> t;
		//a = rand() % 9+1;
		//b = rand() % 9+1;
		//t = rand() % 9+1;
		l = 0;
		r = 10000;
		num = 0;
		while (num<35) {
			mid = (l + r) / 2;
			if (pow(mid, a)*pow(log(mid), b) > t) {
				r = mid;
			}
			else {
				l = mid;
			}
			num++;
			//cout << setprecision(15) << mid << "\n";
		}
		cout << setprecision(15) << mid << "\n";
	}
	//end_t = clock();
	//cout << end_t - start_t;
	return 0;
}
0