会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
白墨阁
远方盛大。
首页
新随笔
联系
管理
2024年12月13日
【拓扑排序/图的BFS】
摘要: 【拓扑排序/图的BFS】 有向图 重边 自环 图的BFS 【思路】 queue<-1 while(queue不空){ t<-队头 拓展t所有邻边x if(x未遍历){ queue<-x d[x]=d[t]+1 } } 例题:图中点的层次 https://www.acwing.com/problem/
阅读全文
posted @ 2024-12-13 01:14 White_ink
阅读(24)
评论(0)
推荐(0)
公告