Lang:G++
Edit12345678910111213141516171819202122232425262728293031#include<bits/stdc++.h>#define Ri(a) scanf("%d", &a)#define Rl(a) scanf("%lld", &a)#define Rf(a) scanf("%lf", &a)#define Rs(a) scanf("%s", a)#define Pi(a) printf("%d\n", (a))#define Pf(a) printf("%lf\n", (a))#define Pl(a) printf("%lld\n", (a))#define Ps(a) printf("%s\n", (a))#define W(a) while(a--)#define CLR(a, b) memset(a, (b), sizeof(a))#define MOD 1000000007#define inf 0x3f3f3f3fusing namespace std;typedef long long ll;const int maxn=1e5+10;int dp[111][111][3];char s[111][111];int n,m;int main(){Ri(n),Ri(m);for(int i=1;i<=n;i++)Rs(s[i]+1);CLR(dp,inf);dp[1][1][0]=0;dp[1][1][1]=1;for(int i=1;i<=n;i++){for(int j=1;j<=m;j++){