結果
| 問題 | No.456 Millions of Submits! |
| コンテスト | |
| ユーザー |
rsk0315
|
| 提出日時 | 2018-03-09 03:19:20 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 1,675 ms / 4,500 ms |
| コード長 | 737 bytes |
| 記録 | |
| コンパイル時間 | 434 ms |
| コンパイル使用メモリ | 69,352 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-06 22:24:30 |
| 合計ジャッジ時間 | 9,303 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
ソースコード
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstdint>
#include <algorithm>
int main() {
int m;
scanf("%d", &m);
constexpr double e=exp(1);
for (int i=0; i<m; ++i) {
int a, b;
double t;
scanf("%d %d %lf", &a, &b, &t);
if (b == 0) {
printf("%.12f\n", pow(t, 1.0/a));
continue;
}
if (a == 0) {
printf("%.12f\n", exp(pow(t, 1.0/b)));
continue;
}
double q=pow(t, 1.0/b)*a/b;
double lb=std::min(e, q), ub=std::max(e, q);
for (int i=0; i<50; ++i) {
asm ("BEGIN:\n\tnop\n\t");
double mid=(lb+ub)/2.0;
asm ("END:\n\tnop\n\t");
(mid*log(mid)<q? lb:ub) = mid;
}
printf("%.12f\n", pow(ub, static_cast<double>(b)/a));
}
}
rsk0315