結果
| 問題 |
No.456 Millions of Submits!
|
| コンテスト | |
| ユーザー |
chocorusk
|
| 提出日時 | 2019-12-12 22:20:46 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 1,568 ms / 4,500 ms |
| コード長 | 1,091 bytes |
| コンパイル時間 | 990 ms |
| コンパイル使用メモリ | 109,160 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-25 18:51:22 |
| 合計ジャッジ時間 | 11,534 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
ソースコード
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <complex>
#include <unordered_map>
#include <unordered_set>
#include <random>
#include <cassert>
#include <fstream>
#include <utility>
#include <functional>
#include <time.h>
#include <stack>
#include <array>
#define popcount __builtin_popcount
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
double solve(int a, int b, double t){
if(b==0) return pow(t, 1.0/a);
if(a==0) return exp(pow(t, 1.0/b));
double x=2;
for(int i=0; i<20; i++){
double y=log(x), xp=1, yp=1;
for(int j=0; j<a-1; j++) xp/=x;
for(int j=0; j<b-1; j++) yp/=y;
double z=(x*y-t*xp*yp)/(a*y+b);
x-=z;
}
return x;
}
int main()
{
int m;
scanf("%d", &m);
for(int i=0; i<m; i++){
int a, b; double t;
scanf("%d %d %lf", &a, &b, &t);
printf("%.10lf\n", solve(a, b, t));
}
return 0;
}
chocorusk