UVA12587 Reduce the Maintenance Cost
Description
[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=441&page=show_problem&problem=4032
[PDF](https://uva.onlinejudge.org/external/125/p12587.pdf)

Input Format

Output Format
