摘要: 题目详情 - L2-001 紧急救援 (25 分) (pintia.cn) #include<iostream> #include<cstring> #include<queue> using namespace std; typedef pair<int,int> PAII; int n,m,A, 阅读全文
posted @ 2022-04-20 23:53 小志61314 阅读(39) 评论(0) 推荐(0)
摘要: 这个题本质上是flood fill 变形+记忆化搜索 有m个读入数据,每次bfs或者dfs必然会超时 就把之前已经搜过的点标记一下,然后这个算是01相邻的一个连通块,这个实质上就是求哪一块01连通块里面元素的个数 bfs #include<iostream> #include<cstring> #i 阅读全文
posted @ 2022-04-20 20:46 小志61314 阅读(52) 评论(0) 推荐(0)