Building Point Pair
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
说明
Do you remember that when you first entered Fujian Normal University in your freshman year, the enthusiastic seniors and sisters gave you a gift package for the start of school. There is a map in the gift package. On the map, there are teaching buildings on the map. They are connected by undirected roads, the distance of each road is .
Now You are given two integers which refers two special teaching buildings. Please find the total number of pairs of the teaching buildings to satisfy : Every path from to must go through two special teaching buildings and .
输入格式
The first line contains four integers .
The next lines contains two integers , represent an edge between building and .
输出格式
Print the total number of pairs that meets the conditions.