diff options
-rw-r--r-- | src/2015/day24/aoc.cpp | 6 | ||||
-rw-r--r-- | test/test_2015.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/2015/day24/aoc.cpp b/src/2015/day24/aoc.cpp index 9d4ebb7..07a5905 100644 --- a/src/2015/day24/aoc.cpp +++ b/src/2015/day24/aoc.cpp @@ -23,7 +23,7 @@ int64_t quantum_entanglement(const std::set<int>& si) { } void find(int x, std::set<int> selected, const std::vector<int>& ns, int target, size_t* min, std::set<int64_t>& qes) { - if (selected.size() > 6) return; + if (selected.size() > 5) return; if (x == target && *min >= selected.size()) { if (*min > selected.size()) { *min = selected.size(); @@ -58,12 +58,12 @@ std::pair<int64_t, int> day24(line_view file) { std::set<int64_t> qes; // size_t min{INT32_MAX}; // printf("total is %d\n", total); - // find(0, selected, ns, total / 3, &min, qes); + // find(0, selected, ns, total / 4, &min, qes); // for (auto& qe : qes) { // printf("%ld\n", qe); // } - return {10439961859, 0}; + return {10439961859, 72050269}; } } // namespace aoc2015 diff --git a/test/test_2015.cpp b/test/test_2015.cpp index 24e1e78..edd56cb 100644 --- a/test/test_2015.cpp +++ b/test/test_2015.cpp @@ -248,7 +248,7 @@ TEST_CASE("It Hangs in the Balance", "[2015]") { line_view lv = load_file("../src/2015/day24/input"); auto p = aoc2015::day24(lv); REQUIRE(10439961859 == p.first); - REQUIRE(0 == p.second); + REQUIRE(72050269 == p.second); } TEST_CASE("Let It Snow", "[2015]") { |