UVA12360 Elecrical Pollution

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=278&page=show_problem&problem=3782 [PDF](https://uva.onlinejudge.org/external/123/p12360.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12360/6fc44053712eda74a0dfcbec1ad6740b7c9821ea.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12360/823bd0fbccf02cec9275e6063efb9fa2f3a6b82c.png)

Output Format

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