#include<stdio.h> #include<limits.h> struct grid { int x,y; int color,magic; int min_cost; } grid[100][100]; int dx[4]= {0,0,1,-1},dy[4]= {1,-1,0,0}; struct grid queue[10000];//存疑 void bfs(int gridSize) { &nbs...