diff options
author | kaiwu <kaiwu2004@gmail.com> | 2023-01-22 12:26:54 +0800 |
---|---|---|
committer | kaiwu <kaiwu2004@gmail.com> | 2023-01-22 12:26:54 +0800 |
commit | 6486ade92a73f9a248af5669d263286d301bfed1 (patch) | |
tree | 1fb85fa700a2cc30a9991afcdbb8be41020ea6b4 /src/2016/day13/aoc.cpp | |
parent | 17bbbec555e83354c16f975bd4d7ec50bb967896 (diff) | |
download | advent-of-code-6486ade92a73f9a248af5669d263286d301bfed1.tar.gz advent-of-code-6486ade92a73f9a248af5669d263286d301bfed1.zip |
2016 day14 part1
Diffstat (limited to 'src/2016/day13/aoc.cpp')
-rw-r--r-- | src/2016/day13/aoc.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/2016/day13/aoc.cpp b/src/2016/day13/aoc.cpp index b14d03e..994bb83 100644 --- a/src/2016/day13/aoc.cpp +++ b/src/2016/day13/aoc.cpp @@ -44,7 +44,7 @@ int64_t bfs(pos start, pos end, int64_t favorite, std::set<pos>& visited) { for (pos p : ns) { if (is_space(p.x, p.y, favorite)) { auto it = visited.find(p); - if (it == visited.end() || it->n >= p.n) { + if (it == visited.end() || it->n > p.n) { q.push_back(p); } } |