随笔分类 -  0x60 图论

从图的某个点开始的深度(bfs)
摘要:如:从1开始 bfs 1 queue<int> q; 2 q.push(1); 3 c[1]=1; 4 v[1]=1; 5 while(q.size()) { 6 int x=q.front(); 7 q.pop(); 8 for(int i=head[x]; i; i=nxt[i]) { 9 in 阅读全文
posted @ 2022-05-10 20:29 我疯故我在 阅读(49) 评论(0) 推荐(0) 编辑




点击右上角即可分享
微信分享提示