BFS搜索 set<string> visited; int BFS(string str,string eam) { queue<pair<string, int> > myQueue; myQueue.push(make_pair(str, 0));//压入初始点 visited.insert(str); while (!myQueue.empty()) { string curt = myQueue.front().first;//获取当前点 int t = myQueue.front().second; myQueue.pop(); if (strs...