From d59fa6d515b6465bdfc8c22f22ca73dda09f5bfa Mon Sep 17 00:00:00 2001 From: algorithmzuo Date: Thu, 25 Mar 2021 23:11:56 +0800 Subject: [PATCH] modify code --- src/class43/Code03_PavingTile.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/class43/Code03_PavingTile.java b/src/class43/Code03_PavingTile.java index 4a7ce01..c4bf363 100644 --- a/src/class43/Code03_PavingTile.java +++ b/src/class43/Code03_PavingTile.java @@ -148,7 +148,7 @@ public class Code03_PavingTile { } int ans = 0; ans += dfs3(op, col - 1, level, N, M, dp); - if ((op & (1 << col)) == 0 && col - 1 >= 0 && (op & (1 << (col - 1))) == 0) { + if (col > 0 && (op & (3 << (col - 1))) == 0) { ans += dfs3((op | (3 << (col - 1))), col - 2, level, N, M, dp); } return ans;