Problem C. Dynamic Graph Matching

HDU - 6321