問題一覧 > 通常問題

No.456 Millions of Submits!

レベル : / AI推定難易度 : 1700 / 実行時間制限 : 1ケース 4.500秒 / メモリ制限 : 512 MB / 小数誤差許容問題 絶対誤差または相対誤差が $10^{-9}$ 以下。ただし、ジャッジ側の都合で500桁未満にしてください
タグ : (AC するまで非表示) / 解いたユーザー数 66
作問者 : はむこ / テスター : りあん
お気に入りにしたユーザー ProblemId : 1451 / 自分の提出
問題文最終更新日: 2026-06-25 16:35:13
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
Advent Calendar Contest 2016 (順位表) の他の問題:

Problem Statement

Since the dawn of history, competitive programmers have made millions of submissions.
More than 1 million submissions have been made on Atcoder, and it is said that $m$ of them were polynomial-time algorithms.

According to a survey, the program submitted $i$-th,
for a positive input size $n$, takes $n^{a_i} \log^{b_i} n$ seconds of computation time (n is not necessarily an integer; log is the natural logarithm).
It is also known that the $i$-th submission actually took $t_i$ seconds.

Each submission is said to have been solved for an input size n. Among the possible values of n, find the largest n.

Input

m
a_1 b_1 t_1
...
a_m b_m t_m

$1 \leq m \leq 1000000$, integer.
$0 \leq a_i, b_i \leq 10$, integers.
For every $i$, at least one of $a_i$ and $b_i$ is not $0$.
$0.1 \leq t_i \leq 10$, given to the 4th decimal place (the 5th and later decimal places are not given).

Output

Output $m$ lines in total. On the $i$-th line, output the largest $n$ among the sizes $n$ that the $i$-th submission was run on.
An error of up to $10^{-9}$ is allowed. Print a newline at the end.

Due to the output size limit, printing more than 12 decimal places may result in OLE (Output Limit Exceed).
It is recommended to output your answers with at most 12 decimal places.

NOTE

Using a fast language is recommended. It has been confirmed that C++ and C# can pass.
Please note that, because of the output size, judging the last case may take a very long time.

Sample

Sample 1
Input
3
2 0 9.0000
1 1 10.0000
0 1 2.0000
Output
3
5.728925565387
7.389056098933

For the 1st line, $n^2 = 9$, so $n=3$.
For the 2nd line, $n \log n = 10$. This has a unique solution at $n \fallingdotseq 5.728925565387$.
For the 3rd line, $\log n = 2$, so $n=e^2 \fallingdotseq 7.389056098933$.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。