先计算每个宝箱到所有点的最短距离,然后从起点开始搜索每次搜索前先遍历所有宝箱的位置,选定一个符合要求的宝箱后开始搜索,如果搜索完所有宝箱,返回步数,否则返回-1 #include<bits/stdc++.h> using namespace std; struct node { int x,y,t; }A[10]; char mp[55][55]; bool book[55][55]; int dp[55][55][10];//记录宝箱到每个点的最短距离 int m,n; int tx[4] = {0,1,0,-1}; int ty[4] = {1,0,-1,0}; int cnt...