#include <iostream> #include <string> #include<unordered_map> using namespace std; unordered_map<char,pair<int,int>> mp={ {'A',{-1,0}}, {'W',{0,1}}, {'S',{0,-1}}, {'D',{1,0}} }; //执行移动命令 void doCommand(pair<int,int>& p,string& command){ ...