結果
| 問題 | No.456 Millions of Submits! |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-08-14 01:02:15 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,540 bytes |
| 記録 | |
| コンパイル時間 | 1,875 ms |
| コンパイル使用メモリ | 168,208 KB |
| 実行使用メモリ | 10,524 KB |
| 最終ジャッジ日時 | 2024-06-23 19:05:26 |
| 合計ジャッジ時間 | 13,207 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 WA * 6 TLE * 1 |
ソースコード
// {{{ Templates
#include <bits/stdc++.h>
#define show(x) cerr << #x << " = " << x << endl
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v)
{
os << "sz:" << v.size() << "\n[";
for (const auto& p : v) {
os << p << ",";
}
os << "]\n";
return os;
}
template <typename S, typename T>
ostream& operator<<(ostream& os, const pair<S, T>& p)
{
os << "(" << p.first << "," << p.second
<< ")";
return os;
}
constexpr ll MOD = (ll)1e9 + 7LL;
template <typename T>
constexpr T INF = numeric_limits<T>::max() / 100;
// }}}
inline long double calc(const ll a, const ll b, const long double s)
{
return (long double)pow(s, a) * (long double)pow(log(s), b);
}
int main()
{
cin.tie(0);
ios::sync_with_stdio(false);
ll m;
cin >> m;
for (ll i = 0; i < m; i++) {
ll a, b;
cin >> a >> b;
long double t;
cin >> t;
long double inf = 1.0;
long double sup = 30000.0;
constexpr long double EPS = 1e-15;
while (sup > inf) {
const long double mid = (inf + sup) / 2;
const long double c = calc(a, b, mid);
if (abs(c - t) < EPS) {
break;
}
if (c < t) {
inf = mid;
} else {
sup = mid;
}
}
cout << fixed << setprecision(12) << inf << "\n";
}
return 0;
}