結果

問題 No.456 Millions of Submits!
ユーザー 紙ぺーぱー紙ぺーぱー
提出日時 2016-12-08 01:42:03
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 526 bytes
コンパイル時間 1,440 ms
コンパイル使用メモリ 165,112 KB
実行使用メモリ 8,396 KB
最終ジャッジ日時 2023-09-05 10:30:30
合計ジャッジ時間 9,813 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
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 <bits/stdc++.h>

int main(){
    int n,a,b;
    double t;
    scanf("%d\n",&n);
    for(int i=0;i<n;i++){
        scanf("%d%d%lf\n",&a,&b,&t);
        if(b!=0)t=exp(t);
        double l=0.0,r=0.0;
        if(a==0)r=pow(exp(10),1.0/b)+1;
        else r=pow(10,1.0/a)+1;
        for(int k=0;k<50;k++){
            double x=(l+r)/2;
            double v;
            if(b!=0)v=pow(x,b*pow(x,a));
            else v=pow(x,a);
            if(v<=t)l=x;
            else r=x;
        }
        printf("%.10lf\n",r);
    }
}
0