From a928216332e726b54fa4e2caa0749b92e3b17a33 Mon Sep 17 00:00:00 2001 From: Eric Mertens Date: Wed, 16 Nov 2022 21:23:40 -0800 Subject: [PATCH] fixup --- 2019/21.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/2019/21.cpp b/2019/21.cpp index f88b1e4..95c1e0a 100644 --- a/2019/21.cpp +++ b/2019/21.cpp @@ -63,7 +63,7 @@ auto QuineMcCluskey( std::vector> nextbatch; nextbatch.resize(current.size()-1); - for (std::size_t ones = 0; ones+1 < nextbatch.size(); ones++) { + for (std::size_t ones = 0; ones+1 < current.size(); ones++) { if (!current[ones+1].empty()) { for (auto const& t1 : current[ones]) { for (auto const& t2 : current[ones+1]) { @@ -245,7 +245,7 @@ auto Compute( auto const terms = QuineMcCluskey(p, sensor.size(), cases); std::cout << (p ? "\nTRUE\n" : "\nFALSE\n"); for (auto const s : sensor) { - std::cout << char('A'+s); + std::cout << char('A'+s-1); } std::cout << std::endl; for (auto const& term : terms) {