UVA775 Hamiltonian Cycle

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=9&page=show_problem&problem=716 [PDF](https://uva.onlinejudge.org/external/7/p775.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA775/0ddde04182e784048471d7845448830a6be0a0e2.png)

Input Format

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

Output Format

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