Skip to content

Commit

Permalink
Update cat-and-mouse.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
kamyu104 authored Jan 17, 2021
1 parent ac094ed commit db70003
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions C++/cat-and-mouse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ class Solution {
if (i == HOLE) {
continue;
}
color[make_tuple(HOLE, i, CAT)] = MOUSE;
q.emplace(HOLE, i, CAT, MOUSE);
for (const auto& t : {MOUSE, CAT}) {
color[make_tuple(HOLE, i, t)] = MOUSE;
q.emplace(HOLE, i, t, MOUSE);
color[make_tuple(i, i, t)] = CAT;
q.emplace(i, i, t, CAT);
}
Expand Down

0 comments on commit db70003

Please sign in to comment.