====BFS 找联通量,找component. Number of Islands (BFS, DFS 都可以做) Surrounded Regions 算法是:先收集四个周边的 O,然后用BFS或者DFS向里面扩展,visited记录connect点,最后如果没有被visited到的O,会变成X;T: O(m*n), Space: O(m*n). Is Graph Bipartite (
畅通工程续 Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 23022 Accepted Submission(s): 8085 Problem Description 某省自从实行了很多年的畅通工程计划后,终
最短路 Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 34140 Accepted Submission(s): 14820 Problem Description 在每年的校赛里,所有进入决赛的同学都会获
总结 d i j k s t r a dijkstra dijkstra h e a p − d i j k s t r a heap-dijkstra heap−dijkstra b e l l m a n f o r d bellmanford bellmanford s p f a spfa spfa f l o y d floyd floyd最短路类型单源单源单源单源全源数据维护 e