UVA11485 Extreme Discrete Summation

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=26&page=show_problem&problem=2480 [PDF](https://uva.onlinejudge.org/external/114/p11485.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11485/dfff361a772cb21299fddc42b0c240ea3af28546.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11485/ee47887f43f9c9f1add7e7ad57655dc46d8521db.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11485/329aa7b00dfd240119361eae9072d4cc4724696d.png)