結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 3 ms
4,376 KB
testcase_08 AC 4 ms
4,380 KB
testcase_09 AC 19 ms
4,380 KB
testcase_10 AC 18 ms
4,380 KB
testcase_11 AC 169 ms
4,376 KB
testcase_12 AC 1,677 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;
        for (int i = 0; i < 5; ++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