← 返回 meta 的题目列表Graph Compression - Merge Nodes
类型:online_judge
meta
Implement a function to decide if two given nodes need to be merged. Then, write code to merge nodes. Finally, given a graph, compress the graph using the previously implemented functions.
Example
Input
Graph with nodes and merge rules