题解
题解:P15972 「RedStone OI R10 A」菊花残
题目 数据结构定义 struct edge:存储每条边的两个端点 u 和 v。 edges[maxn]:存储所有输入的边。 de[maxn]:记录每个节点的度数。 st[maxn]:前缀和数组,用于确定每个节点的邻居的起始和结束位置。 e[maxn]:邻接表的扁平化存储,存储所有…
题目 数据结构定义 struct edge:存储每条边的两个端点 u 和 v。 edges[maxn]:存储所有输入的边。 de[maxn]:记录每个节点的度数。 st[maxn]:前缀和数组,用于确定每个节点的邻居的起始和结束位置。 e[maxn]:邻接表的扁平化存储,存储所有…