結果

問題 No.456 Millions of Submits!
ユーザー koba-e964koba-e964
提出日時 2016-12-08 00:08:58
言語 C++11
(gcc 11.4.0)
結果
TLE  
実行時間 -
コード長 1,013 bytes
コンパイル時間 690 ms
コンパイル使用メモリ 86,272 KB
実行使用メモリ 8,156 KB
最終ジャッジ日時 2023-09-05 08:37:47
合計ジャッジ時間 9,949 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>

#define REP(i,s,n) for(int i=(int)(s);i<(int)(n);i++)

using namespace std;
typedef long long int ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef pair<int, int> PI;
const ll mod = 1e9 + 7;

double solve(int a, int b, double t) {
  double lo = 0, hi = 30000;
  REP(loop_cnt, 0, 50) {
    double mid = (lo + hi) / 2;
    if (pow(mid, a) * pow(log(mid), b) <= t) {
      lo = mid;
    } else {
      hi = mid;
    }
  }
  return lo;
}

int main(void){
  int m;
  cin >> m;
  REP(i, 0, m) {
    int a, b;
    double t;
    cin >> a >> b >> t;
    printf("%.15f\n", solve(a, b, t));
  }
}
0