結果
| 問題 | No.456 Millions of Submits! |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-12-05 17:13:09 |
| 言語 | D (dmd 2.109.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 686 bytes |
| 記録 | |
| コンパイル時間 | 2,408 ms |
| コンパイル使用メモリ | 159,616 KB |
| 実行使用メモリ | 10,272 KB |
| 最終ジャッジ日時 | 2024-06-12 22:47:47 |
| 合計ジャッジ時間 | 12,652 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 WA * 7 TLE * 1 |
ソースコード
import std.algorithm, std.conv, std.range, std.stdio, std.string;
import std.math; // math functions
import std.typecons; // Tuple, Nullable, BigFlags
void main()
{
auto m = readln.chomp.to!int;
foreach (_; 0..m) {
auto rd = readln.splitter;
auto a = rd.front.to!int; rd.popFront();
auto b = rd.front.to!int; rd.popFront();
auto t = rd.front.to!real;
auto calc(real n)
{
return n ^^ a * log(n) ^^ b - t;
}
auto mi = 0.1L, ma = mi;
while (calc(ma) < 0) ma *= 2;
auto bsearch = iota(mi, ma, 1.0e-10L).map!(n => tuple(n, calc(n))).assumeSorted!"a[1] < b[1]";
writefln("%.10f", bsearch.lowerBound(tuple(0, 0)).back[0]);
}
}