UVA10103 Karpovich blocks

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=13&page=show_problem&problem=1044 [PDF](https://uva.onlinejudge.org/external/101/p10103.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10103/4966fbf6e20f25e97bc2c99b7e36e4666eb15cd4.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10103/4db023bd97d6410a9ba314cfa8b6d8a9ab043c53.png)

Output Format

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