Skip to content

Commit 61d40a9

Browse files
authored
Update 8.cpp
1 parent 2318bd8 commit 61d40a9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

13/8.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,15 @@ int solution(vector<vector<int> > board) {
8989
Node pos = nextPos[i];
9090
for (int j = 0; j < visited.size(); j++) {
9191
if (pos.pos1X == visited[j].pos1X && pos.pos1Y == visited[j].pos1Y && pos.pos2X == visited[j].pos2X && pos.pos2Y == visited[j].pos2Y) {
92-
check = false;
93-
break;
94-
}
92+
check = false;
93+
break;
94+
}
9595
}
9696
if (check) {
97-
q.push({pos, cost + 1});
98-
visited.push_back(pos);
99-
}
97+
q.push({pos, cost + 1});
98+
visited.push_back(pos);
99+
}
100100
}
101101
}
102102
return 0;
103-
}
103+
}

0 commit comments

Comments
 (0)