aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/2022/day24/aoc.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/2022/day24/aoc.cpp b/src/2022/day24/aoc.cpp
index f87c252..52f90e0 100644
--- a/src/2022/day24/aoc.cpp
+++ b/src/2022/day24/aoc.cpp
@@ -24,10 +24,8 @@ void expedition(int m, pos p, pos target, valley& v, int* min, bool pass) {
}
else {
auto& t = v.get_time(p.y, p.x);
-
if (m < t || pass) {
- printf("(%d, %d) in %d, was %d\n", p.x, p.y, m, t);
- if (!pass) t = m;
+ // printf("(%d, %d) in %d, was %d\n", p.x, p.y, m, t);
v.next();
std::map<blizzard, int> mp;
@@ -45,10 +43,11 @@ void expedition(int m, pos p, pos target, valley& v, int* min, bool pass) {
{p.x-1, p.y},
p,
};
- for (int i = 0; i < (pass ? 2 : 5); i++) {
+ for (int i = 0; i < 5; i++) {
auto mv = mv0[i];
if (is_valid(mv, mp, v)) {
auto blz = v.blz;
+ t = m;
expedition(m + 1, mv, target, v, min, i > 1);
v.blz = blz;
}