摘要: 题目来源:https://www.luogu.com.cn/problem/P1162 bfs水题,把1和其包围圈视为一个整体,对其周围“注水”。 第一次提交过了两个测试点,查询后发现在bfs函数中 void bfs(int x, int y) { q.push({ 0,0 }); while (! 阅读全文
posted @ 2025-04-28 19:55 yubai111 阅读(16) 评论(0) 推荐(0)
摘要: 题目来源:https://www.luogu.com.cn/problem/P1135 ` typedef pair<int, int>Pi; int N, A, B;bool hs[201]; int K[250];queueq; int bfs(int nown, int fn) { q.pus 阅读全文
posted @ 2025-04-28 19:17 yubai111 阅读(12) 评论(0) 推荐(0)