From 5377499416bae0ee9a51c1cd2c8f932e317db9cb Mon Sep 17 00:00:00 2001 From: Adam Spragg Date: Sat, 17 Dec 2022 21:28:54 +0000 Subject: Allow debug mode to work with real data. Only tried it with test data before, where we don't need the permutation pruning system. If you enable it with live data, it prevents any permutations from being skipped, so it takes forever. --- 16.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/16.c b/16.c index da78368..aaf10cc 100644 --- a/16.c +++ b/16.c @@ -326,9 +326,10 @@ main(int argc, char ** argv) // Is it a new high? if (flow > max) { if (debug) { + struct valve ** j; fprintf(stderr, "Found new max flow: %d: ", max); - for (pv = path; pv < path + 1 + nflows; ++pv) - fprintf(stderr, "%s%s", pv == path ? "" : "->", (*pv)->name); + for (j = path; j < path + 1 + nflows; ++j) + fprintf(stderr, "%s%s", j == path ? "" : "->", (*j)->name); fprintf(stderr, "\n"); } max = flow; -- cgit v1.2.1