Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|

Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |

Language: Downpayment
Description Large houses cost a lot of money. Typically, a loan is required in order to finance the investment. The credit institutions provide a plentitude of different mortgage alternatives, e.g., you may choose to tie the current interest rate for a period. During this period, you may not change institution or terms. After this period, you may change terms, at a penalty cost, or start a new period. The tricky thing is that the interest changes over time. In this problem, we make the absurd assumption that a crystal ball is at your disposal. That is, you know, in advance, what the different interest rates for all institutions are going to be. Given this information, your task is to come up with a plan for the payments which minimizes the absolute amount of money paid over the entire period. For each month, the following items are - Any possible penalties for changing the terms. For the first month, you may choose any alternative without penalty.
- The interest for the dept, including the penalty.
Input On the first line of input there is one integer, Output Start each test case with a line stating the test case, as this: “ Sample Input 2 1 200 100 1 0 5 3 3 3 3 3 2 300 100 1 2 0 4 4 0 4 7 15 20 5 3 10 4 10 Sample Output Test case 1 Month 1: Alternative 1 Month 2: Alternative 1 Month 3: Alternative 1 Total: 209.45 Test case 2 Month 1: Alternative 1 Month 2: Alternative 2 Month 3: Alternative 2 Month 4: Alternative 2 Total: 354.85 Source |

[Submit] [Go Back] [Status] [Discuss]

All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di

Any problem, Please Contact Administrator