#include<bits/stdc++.h> using namespace std; int Map[106][106]; int Vis[106][106]; int Num[106][106]; int T; const int step[2][2] = {1,0,0,1}; void Init() { memset(Map,0,sizeof(Map)); memset(Vis,0,sizeof(Vis)); memset(Num,0,sizeof(Num)); } struct No…