UVA10046 Fold-up Patterns

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=12&page=show_problem&problem=987 [PDF](https://uva.onlinejudge.org/external/100/p10046.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10046/90e5ff4430220a0b64418a8a4d59b376bd5b7a37.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10046/6507b8744bd34d284e6ca0d8cdaa4112d8a31cf1.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10046/01547f4f449f46077208c5146714e58d4c2cce3e.png)