Skip to content

Commit b229a18

Browse files
authored
Update bomb-enemy.cpp
1 parent 3c5a932 commit b229a18

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

C++/bomb-enemy.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ class Solution {
1313
vector<vector<int>> right{grid.size(), vector<int>(grid[0].size())};
1414
for (int i = grid.size() - 1; i >= 0; --i) {
1515
for (int j = grid[0].size() - 1; j >= 0; --j) {
16-
if (grid[i][j] != 'Y') {
16+
if (grid[i][j] != 'W') {
1717
if (i + 1 < grid.size()) {
1818
down[i][j] = down[i + 1][j];
1919
}
2020
if (j + 1 < grid[0].size()) {
2121
right[i][j] = right[i][j + 1];
2222
}
23-
if (grid[i][j] == 'X') {
23+
if (grid[i][j] == 'E') {
2424
++down[i][j];
2525
++right[i][j];
2626
}
@@ -33,10 +33,10 @@ class Solution {
3333
for (int i = 0; i < grid.size(); ++i) {
3434
left = 0;
3535
for (int j = 0; j < grid[0].size(); ++j) {
36-
if (grid[i][j] == 'Y') {
36+
if (grid[i][j] == 'W') {
3737
up[j] = 0;
3838
left = 0;
39-
} else if (grid[i][j] == 'X') {
39+
} else if (grid[i][j] == 'E') {
4040
++up[j];
4141
++left;
4242
} else {

0 commit comments

Comments
 (0)