裸题,就是一开始把柱子当成树的节点然后wa了 已发
#include<cstdio>
#include<cstring>
#include<iostream>
#define LL long long
#define Mod 1000000000
using namespace std;
int n,m,cnt,mat[85][85];
LL a[85][85],ans=1;
char s[12][12];
inline int Q(int a,int b){return mat[a][b];}
void solve(){
for(int i=1;i<cnt;i++){
for(int j=i+1;j<cnt;j++){
while(a[j][i]){
LL s=a[i][i]/a[j][i];
for(int k=i;k<cnt;k++)
a[i][k]=(a[i][k]+Mod-a[j][k]*s%Mod)%Mod,swap(a[j][k],a[i][k]);
ans=(Mod-ans)%Mod;
}
}
ans=ans*a[i][i]%Mod;
}
printf("%lld",(Mod+ans)%Mod);
}
int main(){
scanf("%d%d",&n,&m);
for(int i=1;i<=n;i++){
scanf("%s",s[i]+1);
for(int j=1;j<=m;j++)if(s[i][j]!='*'){
mat[i][j]=++cnt;
if(j>1&&s[i][j-1]!='*'){
a[Q(i,j)][Q(i,j-1)]++;
a[Q(i,j-1)][Q(i,j)]++;
a[Q(i,j)][Q(i,j)]++,a[Q(i,j-1)][Q(i,j-1)]++;
}
if(i>1&&s[i-1][j]!='*'){
a[Q(i-1,j)][Q(i,j)]++;
a[Q(i,j)][Q(i-1,j)]++;
a[Q(i,j)][Q(i,j)]++,a[Q(i-1,j)][Q(i-1,j)]++;
}
}
}
solve();
return 0;
}