#include <stdio.h> #include <string.h> #define inf 99999999 #define sz 1100 #define SZ 1100110 long r[]={0,0,-1,1},c[]={-1,1,0,0},dist_joe[sz][sz],dist_fire[sz][sz]; long cur_x,cur_y,que_x[SZ],que_y[SZ],head,tail; long m,n,test,row,col,i,j,no_fire,joe_x,joe_y,cost; char array[sz][sz]; void bfs_fire...