結果
問題 | No.456 Millions of Submits! |
ユーザー | butsurizuki |
提出日時 | 2016-12-08 23:05:33 |
言語 | C90 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 785 bytes |
コンパイル時間 | 761 ms |
コンパイル使用メモリ | 27,532 KB |
実行使用メモリ | 80,540 KB |
最終ジャッジ日時 | 2023-09-05 21:14:42 |
合計ジャッジ時間 | 7,566 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 19 ms
80,388 KB |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | AC | 20 ms
80,432 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 | - |
ソースコード
#include<stdio.h> #include<math.h> #define e 2.7182818284590452355 double big(double a,double b){if(a>b){return a;}return b;} int main(void){ int i,j,n,a,b,p; double min,max,c,t,ax,bx,s[10][10][100000]={0}; scanf("%d",&n); for(i = 1;i <= n;i++){ scanf("%d%d%lf",&a,&b,&t); p = t * 10000 - 10000; if(s[a-1][b-1][p] != 0){printf("%.12lf\n",s[a-1][b-1][p]);continue;} if(a && b){min = 1;max = big(e,t);} else if(b == 0){ax = a;printf("%.12lf\n",pow(t,1/ax));continue;} else{bx = b;printf("%.12lf\n",pow(e,pow(t,1/bx)));continue;} for(j = 1;j <= 30;j++){ c = (min+max)/2; ax = pow(c,a); bx = pow(log(c),b); if(ax*bx < t){min = c;} else{max = c;} } printf("%.12lf\n",(max+min)/2); p = t*10000 - 10000; s[a-1][b-1][p] = (max+min)/2; } return 0; }