This commit is contained in:
Zengtudor 2024-11-23 11:23:12 +08:00
parent 3d9398ff69
commit b48e2c46a6
2 changed files with 5 additions and 6 deletions

View File

@ -84,18 +84,18 @@ int main(){
cin>>n>>m>>c>>f;
totc=0;
totf=0;
// pt(n,m,c,f);
pt(n,m,c,f);
for(ll i{1};i<=n;i++){
cin>>s;
for(ll j{1};j<=m;j++){
g[i][j]=s[j-1]-'0';
// pt(g[i][j]);
pt(g[i][j]);
}
}
// look right
for(ll i{1};i<=n;i++){
// tor[i][m+1]=0;
tor[i][m+1]=0;
for(ll j{m};j>=0;j--){
if(g[i][j]){
tor[i][j]=0;
@ -135,14 +135,14 @@ int main(){
}
}
}
// pnm(tod);
pnm(tod);
for(ll j{1};j<m;j++){
for(ll i{3};i<=n;i++){
if(
tor[i][j]>=2&&tou[i][j]>=3
){
// cout<<make_pair(i,j)<<'\n';
cout<<make_pair(i,j)<<'\n';
totc = (totc+(ptor[i-2][j]*(tor[i][j]-1))%mod)%mod;
if(tod[i][j]-1>0){
totf = (totf+(((ptor[i-1][j]*(tor[i][j]-1))%mod)*(tod[i][j]-1))%mod)%mod;

View File

@ -9,7 +9,6 @@
010
000
000
1 0
6 6 1 1
000010
011000