UVA12705 Breaking Board

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=823&page=show_problem&problem=4443 [PDF](https://uva.onlinejudge.org/external/127/p12705.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12705/17f62a90aa122e8cedf28104fffe65fa3aa6ce32.png)

Input Format

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

Output Format

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