BFS 复习: 创建空队列 将起点放入队列 while 队列不空: 取出并弹出队首 u 枚举 u 能走到的点 v 将可行且没走过的 v 加入队列 空降; 在 2D Conveyor Belt 题目中,通过 bfs 反向搜索确定活格子。起点为所有外围点,行走条件为:在棋盘内部,且要么是 ?,要么上方的字母与行走方向相反,即可以 O(格子数)的时间获得所有活格子。其后逐个去掉摆放的传送带并继续 bfs.
课堂总结
This article was last updated on May 27, 2026 and some of the information may no longer be applicable due to the passage of time.
Article title:课堂总结
Article author:Julyfun
Release time:Jan 3, 2025
Original link:https://how-to.fun/blog/工作/william/241228/课堂总结
Copyright 2026
Sitemap