結果

問題 No.456 Millions of Submits!
ユーザー りあんりあん
提出日時 2016-12-05 13:02:51
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 1,632 ms / 4,500 ms
コード長 728 bytes
コンパイル時間 1,581 ms
コンパイル使用メモリ 163,072 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-05 05:09:01
合計ジャッジ時間 6,644 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
    int m;
    scanf("%d", &m);
    while(m--) {
        long double a, b, t, w, ew;
        scanf("%Lf%Lf%Lf", &a, &b, &t);
        if (b < 0.1) {
            printf("%.12Lf\n", powl(t, 1 / a));
            continue;
        }
        t = powl(t, 1 / b);
        if (a < 0.1) {
            printf("%.12Lf\n", expl(t));
            continue;
        }
        t *= a / b;
        w = 0.665 * (1 + 0.0195 * logl(t + 1)) * logl(t + 1) + 0.04;
        for (int i = 0; i < 3; ++i) {
            ew = expl(w);
            w -= (w * ew - t) / (ew * (w + 1) - (w + 2) * (w * ew - t) / (2 * w + 2));
        }
        printf("%.12Lf\n", expl(w * b / a));
    }
    return 0;
}
0