UVA12348 Fun Coloring

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=278&page=show_problem&problem=3770 [PDF](https://uva.onlinejudge.org/external/123/p12348.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12348/1d180ce351e3ea569af0abf356f1c03bb0b65f2a.png)

Input Format

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

Output Format

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