建图是关键
#include#include #include #include #include #include #include #include #include #include using namespace std;char s[55][55];int n,m,t1,t2,g1[55][55],g2[55][55],mp[1010][1010],ans,link[1010],mark[1010];void init(){ t1=0,t2=0; for(int i=0;i