結果

問題 No.456 Millions of Submits!
ユーザー むらためむらため
提出日時 2019-01-19 09:25:53
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,045 bytes
コンパイル時間 2,848 ms
コンパイル使用メモリ 174,716 KB
実行使用メモリ 27,436 KB
最終ジャッジ日時 2023-09-22 19:21:07
合計ジャッジ時間 5,628 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
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 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#pragma GCC optimize("O3")
#pragma GCC target("avx")
#include "bits/stdc++.h"

using namespace std;
#define REP(i, n) for (int i = 0; i < (n); i++)
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define FORR(i, a, b) for (int i = (b)-1; i >= (a); i--)
int scan() {
  int result = 0;
  while (true) {
    auto k = getchar_unlocked();
    if (k < '0' || k > '9') break;
    result = 10 * result + k - '0';
  }
  return result;
}
double calc(int a, int b, double t) {
  if (a == 0) return exp(pow(t, (double)1 / b));
  if (b == 0) return pow(t, (double)1 / a);
  double x = log(11);
  for (int i = 0; i < 10; i++) {
    double g = a * exp(x) + b;
    double f = g * x - log(t);
    x -= f / g;
  }
  return exp(exp(x));
}

int A[1000010], B[1000010];
double T[1000010], ANS[1000010];
int main() {
  auto m = scan();
  REP(i, m) {
    A[i] = scan();
    B[i] = scan();
    scanf("%lf\n", &T[i]);
  }
  // REP(i, m) printf("%d %d %.9lf\n", A[i], B[i], T[i]);
  REP(i, m) ANS[i] = calc(A[i], B[i], T[i]);
  REP(i, m) printf("%.9lf\n", ANS[i]);
}
0