Search
❯
Aug 27, 20261 min read
邻接表
为每个节点维护一个列表,列表中存储以该点为起点的边。
int N; struct edge { int to, w; // 终点和边权 }; vector<edge> p[N];