結果

問題 No.456 Millions of Submits!
ユーザー antaanta
提出日時 2016-12-07 22:33:44
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,023 bytes
コンパイル時間 2,686 ms
コンパイル使用メモリ 163,152 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-05 06:26:23
合計ジャッジ時間 5,891 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include "bits/stdc++.h"
using namespace std;
#define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define rer(i,l,u) for(int (i)=(int)(l);(i)<=(int)(u);++(i))
#define reu(i,l,u) for(int (i)=(int)(l);(i)<(int)(u);++(i))
static const int INF = 0x3f3f3f3f; static const long long INFL = 0x3f3f3f3f3f3f3f3fLL;
typedef vector<int> vi; typedef pair<int, int> pii; typedef vector<pair<int, int> > vpii; typedef long long ll;
template<typename T, typename U> static void amin(T &x, U y) { if(y < x) x = y; }
template<typename T, typename U> static void amax(T &x, U y) { if(x < y) x = y; }

int main() {
	int T;
	scanf("%d", &T);
	rep(ii, T) {
		int a, b;
		double t;
		scanf("%d%d%lf", &a, &b, &t);
		//a log n + b log log n = log t
		auto logt = log(round(t * 1e4) * 1e-4L);
		auto x = 2.L;
		rep(k, 20) {
			auto logx = log(x);
			auto sub = (x * logx * (a * logx + b * log(logx) - logt)) / (a * logx + b);
			if(abs(sub) < 1e-11) break;
			x -= sub;
			x = max(x, 1.L+1e-13);
		}
		printf("%.10f\n", (double)x);
	}
	return 0;
}
0