| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 1024 MB | 345 | 168 | 89 | 50.568% |
Cocoa, the magic sword president of RUN, has obtained a new magic sword named Armageddon. To maximize its power, Cocoa intends to enhance it.
Specifically, the sword's power is determined by its length $x$, enchantment level $y$, and brilliance $z$, according to the formula:
$\frac{x(x+1)}{2}\cdot\frac{y(y+1)}{2}\cdot a^z$
where $x,y,z$ are nonnegative integers. Here, $a$ is a fixed constant determined when Armageddon was forged. Initially, $x,y,z$ are all initialized to 0.
Cocoa can invest her mana to improve the sword. For each $1$ mana spent, she can increase either $x$, $y$, or $z$ by $1$.
For each $k = 1, 2, \cdots, n$, determine the maximum possible power of the sword if Cocoa uses exactly $k$ mana to enhance the sword.
The first line contains three integers $p$, $q$, and $n$ separated by spaces, where $a = p/q$.
Print $n$ values in a single line, separated by spaces.
For the $i$-th value, output $s \times t^{-1} \pmod{10^9+7}$, where $s/t$ is the irreducible fraction representing the maximum possible power after investing exactly $i$ mana.
1 1 10
0 1 3 9 18 36 60 100 150 225
2 1 10
0 1 3 9 18 36 72 144 288 576
100000 1 5
0 1 100000 999999937 993000007
There is no magic sword president in RUN.
University > KAIST > KAIST ICPC Mock Competition > 2025 KAIST 15th ICPC Mock Competition A번
University > MIT > The MIT Programming Contest > 2025-26 > MIT Team Contest 2 A번