summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Spragg <adam@spra.gg>2022-12-17 21:28:54 +0000
committerAdam Spragg <adam@spra.gg>2022-12-17 21:28:54 +0000
commit5377499416bae0ee9a51c1cd2c8f932e317db9cb (patch)
tree71cdde104b2216f3d09f81b073fe7e4a825731a3
parente906454afbff5ccf9771758d335010d5fb2ab48a (diff)
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.
-rw-r--r--16.c5
1 files 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;