UVA12933 Easy Graph Problem?

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=862&page=show_problem&problem=4812 [PDF](https://uva.onlinejudge.org/external/129/p12933.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12933/d6fd2ef3848b33e5e424c5ecdcbbd76cf2cc7646.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12933/9fcdf72adbf615bf2c8445bda3aff213426dc072.png)