UVA11540 Sultan's Chandelier

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=27&page=show_problem&problem=2535 [PDF](https://uva.onlinejudge.org/external/115/p11540.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11540/cf226fc3135db3f9fc9b564fdfbd4359d13a2299.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11540/1f0f4569d5168589518baa1d7dd663aaac566c23.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11540/398fb02b3cba32a07f15b5564a7ec57b2e92ad19.png)