結果
問題 | No.456 Millions of Submits! |
ユーザー |
![]() |
提出日時 | 2016-12-07 22:13:49 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 1,482 ms / 4,500 ms |
コード長 | 741 bytes |
コンパイル時間 | 1,348 ms |
コンパイル使用メモリ | 165,760 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-23 02:32:51 |
合計ジャッジ時間 | 8,497 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main() {int m;scanf("%d", &m);double e = exp(1);double eps = 1e-10 * 2;while(m--) {int a, b;double t, l, r, n;scanf("%d%d%lf", &a, &b, &t);if (!b) {printf("%.12f\n", pow(t, 1.0 / a));continue;}if (!a) {printf("%.12f\n", exp(pow(t, 1.0 / b)));continue;}double tt = log(t);l = 0;r = 4;while (r - l > eps) {n = (l + r) / 2;if (a * n + b * log(n) > tt)r = n;elsel = n;}printf("%.12f\n", exp((l + r) / 2));}return 0;}