| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 2048 MB | 7 | 6 | 6 | 100.000% |
Lorenzo of Valtier is a traveling merchant navigating the fractured realms of the Five Kingdoms. Each nation mints its own unique coins using secretive forging techniques, creating a hidden economy of conversions:
Currencies
Exchange Rates (Black Market, One-way Currency Exchange):
Forbidden Technique: The Argentum Revenant Tome allows you to exchange 2ドル$ Drowned $→$ 3ドル$ Bleakmarch ("Raising Drowned Silver") for a maximum of $X$ uses, after which the Pale Inquisition is triggered.
Given Lorenzo of Valtier’s initial coin stash and a limit of $X$ on the number of times the forbidden technique may be used, your goal is to maximize the number of Crimson Falconate coins that can be obtained using a series of exchanges. Solving this puzzle may unlock the secret behind how Lorenzo of Valtier became wealthy!
Figure 1: Echange Rates. (Coin images created by DALL·E-3)
A line containing six integers: $A$ (Aetherspire Coin), $B$ (Bleakmarch Coin), $C$ (Crimson Coin), $D$ (Drowned Coin), $E$ (Emberveil Coin), $X$ (maximum use of the Forbidden Technique) satisfying 0ドル≤A,B,C,D,E,X≤10^9$.
A single integer indicating the number of maximum possible Crimson Coins that can be obtained using a series of zero or more of exchanges.
1 2 3 4 5 6
7
Lorenzo of Valtier can obtain 7ドル$ Crimson coins using the following sequence of exchanges beginning with the initial coin count of $(A,B,C,D,E)=(1,2,3,4,5)$.
Note that the forbidden exchange was not used more than $X=6$ times.
5 5 5 5 5 5
11
1000000000 0 500000000 123 456789 1000000000
950114243
University > University of Alberta Programming Contest > UAPC 2025 > Division 1 H번
University > University of Alberta Programming Contest > UAPC 2025 > Division 2 J번