UVA11422 Escaping from Fractal Bacterium

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=26&page=show_problem&problem=2417 [PDF](https://uva.onlinejudge.org/external/114/p11422.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11422/25e08c44d899f75a5ad2866b8088940f028a83e9.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11422/8e6fa55e6e61f133d8445e89704bd3f4155d7bd5.png)

Output Format

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