aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkaiwu <kaiwu2004@gmail.com>2022-03-20 22:34:22 +0800
committerkaiwu <kaiwu2004@gmail.com>2022-03-20 22:34:22 +0800
commit12ebf74e7239404e51da6b2b555a5a539b5c2fac (patch)
tree4ef5dbeaf6f63d1534396d76fca9a7fc62a0f1d7 /src
parent3bd1fa60246ecc9b2431350fb154b20547619da7 (diff)
downloadadvent-of-code-12ebf74e7239404e51da6b2b555a5a539b5c2fac.tar.gz
advent-of-code-12ebf74e7239404e51da6b2b555a5a539b5c2fac.zip
day 17
Diffstat (limited to 'src')
-rw-r--r--src/2015/day17/README.md13
-rw-r--r--src/2015/day17/aoc.cpp5
-rw-r--r--src/2015/day17/aoc.h7
-rw-r--r--src/2015/day17/input20
-rw-r--r--src/CMakeLists.txt1
5 files changed, 46 insertions, 0 deletions
diff --git a/src/2015/day17/README.md b/src/2015/day17/README.md
new file mode 100644
index 0000000..4f6e878
--- /dev/null
+++ b/src/2015/day17/README.md
@@ -0,0 +1,13 @@
+--- Day 17: No Such Thing as Too Much ---
+
+The elves bought too much eggnog again - 150 liters this time. To fit it all into your refrigerator, you'll need to move it into smaller containers. You take an inventory of the capacities of the available containers.
+
+For example, suppose you have containers of size 20, 15, 10, 5, and 5 liters. If you need to store 25 liters, there are four ways to do it:
+
+ 15 and 10
+ 20 and 5 (the first 5)
+ 20 and 5 (the second 5)
+ 15, 5, and 5
+
+Filling all containers entirely, how many different combinations of containers can exactly fit all 150 liters of eggnog?
+
diff --git a/src/2015/day17/aoc.cpp b/src/2015/day17/aoc.cpp
new file mode 100644
index 0000000..1c33c66
--- /dev/null
+++ b/src/2015/day17/aoc.cpp
@@ -0,0 +1,5 @@
+#include "aoc.h"
+
+namespace aoc2015 {
+
+}
diff --git a/src/2015/day17/aoc.h b/src/2015/day17/aoc.h
new file mode 100644
index 0000000..7eb843c
--- /dev/null
+++ b/src/2015/day17/aoc.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#include "common.h"
+
+namespace aoc2015 {
+
+}
diff --git a/src/2015/day17/input b/src/2015/day17/input
new file mode 100644
index 0000000..588b253
--- /dev/null
+++ b/src/2015/day17/input
@@ -0,0 +1,20 @@
+50
+44
+11
+49
+42
+46
+18
+32
+26
+40
+21
+7
+18
+43
+10
+47
+36
+24
+22
+40
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1ed5407..e3b8b6b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -16,6 +16,7 @@ set(SOLUTION_FILES
"2015/day14/aoc.cpp"
"2015/day15/aoc.cpp"
"2015/day16/aoc.cpp"
+ "2015/day17/aoc.cpp"
)
add_library(solution SHARED ${SOLUTION_FILES})