摘要: 基础知识 图的存储方式: ①:邻接矩阵。空间复杂度为O(n2)。 ②:邻接表。空间复杂度为O(n+m)。m为边集的大小。 邻接表的存图和遍历: struct node { int v,nxt,val; }s[maxn]; int head[maxn],tot; inline void add(int 阅读全文
posted @ 2023-05-08 16:25 sakuya726 阅读(81) 评论(0) 推荐(0)