#include <iostream> #include <vector> #include <string> using namespace std; //八个方向 vector<vector<int>> dir = {{-1, -1}, {-1, 0}, {-1, 1}, {0, -1}, {0, 1}, {1, -1}, {1, 0}, {1, 1}}; int main() { int n, m; cin >> n >> m; //这里为什么不是二维数组,因为string本身就是字符串,也就相当于一个一...