UVA10651 Pebble Solitaire

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=18&page=show_problem&problem=1592 [PDF](https://uva.onlinejudge.org/external/106/p10651.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10651/7ed807a85843f7a3f41d367acb0f220504c720ba.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10651/6d4fec70bad06ba86d8930157588d0a0763b8129.png)

Output Format

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