aboutsummaryrefslogtreecommitdiff
path: root/out_of_bounds_paths.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'out_of_bounds_paths.cpp')
-rw-r--r--out_of_bounds_paths.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/out_of_bounds_paths.cpp b/out_of_bounds_paths.cpp
index fa19333..af5ce3f 100644
--- a/out_of_bounds_paths.cpp
+++ b/out_of_bounds_paths.cpp
@@ -20,7 +20,7 @@ public:
curr.swap(last);
for (int i = 1; i <= m; i++)
for (int j = 1; j <= n; j++)
- curr[i][j] = (int)(((long)last[i - 1][j] + last[i + 1][j] +
+ curr[i][j] = (((long)last[i - 1][j] + last[i + 1][j] +
last[i][j - 1] + last[i][j + 1]) %
1000000007L);
ans = (ans + curr[startRow + 1][startColumn + 1]) % 1000000007L;