摘要:
点击查看代码 #include<bits/stdc++.h> using namespace std; typedef pair<int,int> PII; const int MAXN=1005; int n,m; char g[MAXN][MAXN]; int ans[MAXN][MAXN]; 阅读全文
摘要:
点击查看代码 #include <iostream> #include <queue> #include <vector> using namespace std; const int MAXN = 105; int N, M; char grid[MAXN][MAXN]; // 存地图 bool 阅读全文
摘要:
点击查看代码 #include<bits/stdc++.h> using namespace std; const int N=100005; int dist[N]; int t; int x,y; int bfs(int start, int target) { if(start>=target 阅读全文
摘要:
点击查看代码 #include<bits/stdc++.h> using namespace std; const int MAXN = 205; // 题目说 N <= 200,稍微开大一点 int N, A, B; // 表示N层楼,起点和终点A和B int K[MAXN]; // K[i] 表 阅读全文
摘要:
点击查看代码 #include<bits/stdc++.h> using namespace std; const int MAXN = 405; int ans[MAXN][MAXN]; // 存储结果,同时也充当 visited 数组 int n, m, sx, sy; // 马的8个方向 in 阅读全文