UVA12639 Hexagonal Puzzle

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=602&page=show_problem&problem=4387 [PDF](https://uva.onlinejudge.org/external/126/p12639.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12639/ca828402f83df69ec43f926b4304e7fbfb7fe6da.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12639/0eb8d76c208166c57e89ca1fd0aabaea7d9dabfe.png)

Output Format

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