UVA13158 8-ball Rack

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=871&page=show_problem&problem=5080 [PDF](https://uva.onlinejudge.org/external/131/p13158.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13158/89d91c2c0863af5f06907bda10977e93bddd2a56.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13158/18de99aec7c55c186d0c000b3da8d7fa3c8032d5.png)