Longest Paths
题意翻译
你有一个每边都是 $1$ 单向图,输出此图以 $k$ 为起点的最长路长度。
by [279700](https://www.luogu.com.cn/user/279700)
题目描述
[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=12&page=show_problem&problem=941
[PDF](https://uva.onlinejudge.org/external/100/p10000.pdf)
![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10000/4538b0cef0adfb85facbc29db424a374cbf36a38.png)
输入输出格式
输入格式
![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10000/f36fa5f12ef82970ee2351e33f0fc1260e048c97.png)
输出格式
![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10000/54d942a79ecf6ae3369bfc2d929dab888b20b285.png)
输入输出样例
输入样例 #1
2
1
1 2
0 0
5
3
1 2
3 5
3 1
2 4
4 5
0 0
5
5
5 1
5 2
5 3
5 4
4 1
4 2
0 0
0
输出样例 #1
Case 1: The longest path from 1 has length 1, finishing at 2.
Case 2: The longest path from 3 has length 4, finishing at 5.
Case 3: The longest path from 5 has length 2, finishing at 1.