Skip to content

Commit 45f574d

Browse files
authored
Update maximum-number-of-moves-to-kill-all-pawns.cpp
1 parent add1965 commit 45f574d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/maximum-number-of-moves-to-kill-all-pawns.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class Solution {
6161
int result = 0;
6262
const auto& d = bfs(kx, ky);
6363
for (int i = 0; i < size(positions); ++i) {
64-
result = max(result, d[positions[i][0]][positions[i][1]] + dp[1 << i][i]);
64+
result = max(result, dp[1 << i][i] + d[positions[i][0]][positions[i][1]]);
6565
}
6666
return result;
6767
}

0 commit comments

Comments
 (0)