Problem B. Key Vertex
时间限制 5000 ms
内存限制 64 MB
You need walking from vertex S to vertex T in a graph. If you remove one vertex which stops you from walking from S to T, that vertex we call as key vertex. Now you are given a directed graph, S and T, and you should tell us how many key vertexes are there in the graph.
Please notice that S and T are key vertexes and if S cannot walking to T by the directed edge in the initial graph then all vertexes becomes to key vertexes.
输入数据
输出数据
Output the number of key vertexes in a single line for each test case.
样例输入
复制
6 6
0 1
1 2
1 3
2 4
3 4
4 5
0 5
样例输出
$ Mathjax font initiator $