P2944 [USACO09MAR] Earthquake Damage 2 G
题目描述
Wisconsin has had an earthquake that has struck Farmer John's farm! The earthquake has damaged some of the pastures so that they are unpassable. Remarkably, none of the cowpaths was damaged.
As usual, the farm is modeled as a set of P (1
输入格式
\* Line 1: Three space-separated integers: P, C, and N
\* Lines 2..C+1: Line i+1 describes cowpath i with two integers: a\_i and b\_i
\* Lines C+2..C+N+1: Line C+1+j contains a single integer: report\_j
输出格式
\* Line 1: One number, the minimum number of damaged pastures.
说明/提示
Only pasture 2 being damaged gives such a scenario.