
ZOJ Problem Set  3583
A path with no repeated vertices of an undirected graph is called a simple path. Given an undirected graph and two verteices S and D, return the number of vertics which don't lie on any simple paths between S and D. InputThe input contains multiple test cases. Each case starts with a line of four integers, N(1 < N ≤ 100), M(1 ≤ M ≤ N(N  1) / 2), S(0 ≤ S < N), D(0 ≤ D < N). N is the number of vertices, M is the number of edges, S and D are two different vertices. Then M lines follow, each line contains two different integers A(0 ≤ A < N) and B(0 ≤ B < N), which represents an edge of the graph. It's ensure that there is at least one simple path between S and D. OutputOutput the number of such vertics, one line per case. Sample Input4 3 0 2 0 1 1 2 1 3 4 4 0 2 0 1 1 2 1 3 2 3 Sample Output1 0 Author: LIU, Yaoting Contest: ZOJ 10th Anniversary Contest 