一二三四五 上山打老虎

摘要: 链接:https://www.acwing.com/problem/content/1115/ 代码: bfs: #include<iostream> #include<algorithm> #include<queue> using namespace std; char s[25][25]; i 阅读全文
posted @ 2021-04-15 10:49 黒川川 阅读(66) 评论(0) 推荐(0)
摘要: 链接:https://www.acwing.com/problem/content/1103/ 代码: #include<bits/stdc++.h> using namespace std; using PII=pair<int,int>; int dx[]={0,-1,0,1}; int dy[ 阅读全文
posted @ 2021-04-15 10:44 黒川川 阅读(80) 评论(0) 推荐(0)
摘要: 链接:https://www.acwing.com/problem/content/1098/ 思路:1:三维bfs:可以分为当前层数内的二维内偏移和层数的一维偏移 代码: #include<iostream> #include<queue> #include<string> #include<cs 阅读全文
posted @ 2021-04-15 10:42 黒川川 阅读(54) 评论(0) 推荐(0)
摘要: 链接:https://www.acwing.com/problem/content/1235/ 代码: #include<bits/stdc++.h> using namespace std; int k=0,n; char s[1005][1005]; int b[1005][1005]; int 阅读全文
posted @ 2021-04-15 10:38 黒川川 阅读(77) 评论(0) 推荐(0)