P2721 Xiao Q's Money-Making Plan
Background
Xiao Q (solemnly): This year I must make big money!!!
Description
Xiao Q decides to make big money in the new year, and Xiao P recommends financial products. At the beginning of this (non-leap) year, Xiao Q has $10^5$ yuan. There are $N$ financial products, each described by three parameters: release date, investment days, and annual interest rate. At any moment, Xiao Q can hold at most one product. Find the maximum amount of money attainable after one year.
Input Format
The first line contains an integer $N$.
Each of the next $N$ lines contains three space-separated values $A, B, C$:
- $A$ denotes the release date, in the format MMDD.
- $B$ is an integer, the number of investment days, in the range $[10,300]$.
- $C$ has at most $2$ decimal places, representing the annual interest rate in percent, in the range $[3,30]$.
Output Format
A single number: the maximum total funds (principal plus interest) obtainable at the end of the year, rounded to two decimal places.
Explanation/Hint
$0 \le N \le 10^4$。
Translated by ChatGPT 5