随笔分类 - kruskal重构树
摘要:题目描述 You are given a complete undirected graph with nn vertices. A number a_{i}ai is assigned to each vertex, and the weight of an edge between verti
阅读全文
摘要:Description 众所周知,小 naive 有一张 n 个点,m 条边的带权无向图。第 i 个点的颜色为 ci。d(s, t)表示从点 s 到点 t 的权值最小的路径的权值,一条路径的权值定义为路径上权值最大的边的权值。 求所有满足 u < v, |cu − cv| ≥ L 的点对 (u, v
阅读全文