aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkaiwu <kaiwu2004@gmail.com>2023-01-19 12:33:13 +0800
committerkaiwu <kaiwu2004@gmail.com>2023-01-19 12:33:13 +0800
commit492fc08facfd4c46a7176c67d55ddb4947e88ba6 (patch)
treeefa368d6bb32db656db25d973573dcdaa85b2ff1 /src
parentfcae0ee26bf6b5909441ac47e4acfe3fd040c025 (diff)
downloadadvent-of-code-492fc08facfd4c46a7176c67d55ddb4947e88ba6.tar.gz
advent-of-code-492fc08facfd4c46a7176c67d55ddb4947e88ba6.zip
2015 day24 done
Diffstat (limited to 'src')
-rw-r--r--src/2015/day24/aoc.cpp6
1 files changed, 3 insertions, 3 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