aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/2017/day1/README.md1
-rw-r--r--src/2017/day1/aoc.cpp3
-rw-r--r--src/2017/day1/aoc.h6
-rw-r--r--src/2017/day1/input1
-rw-r--r--src/2018/day1/README.md1
-rw-r--r--src/2018/day1/aoc.cpp3
-rw-r--r--src/2018/day1/aoc.h6
-rw-r--r--src/2018/day1/input1
-rw-r--r--src/2019/day1/README.md21
-rw-r--r--src/2019/day1/aoc.cpp3
-rw-r--r--src/2019/day1/aoc.h6
-rw-r--r--src/2019/day1/input1
-rw-r--r--src/2020/day1/README.md21
-rw-r--r--src/2020/day1/aoc.cpp3
-rw-r--r--src/2020/day1/aoc.h6
-rw-r--r--src/2020/day1/input1
-rw-r--r--src/2021/day1/README.md21
-rw-r--r--src/2021/day1/aoc.cpp3
-rw-r--r--src/2021/day1/aoc.h6
-rw-r--r--src/2021/day1/input1
-rw-r--r--src/CMakeLists.txt5
-rw-r--r--test/CMakeLists.txt5
-rw-r--r--test/test_2017.cpp7
-rw-r--r--test/test_2018.cpp0
-rw-r--r--test/test_2019.cpp7
-rw-r--r--test/test_2020.cpp7
-rw-r--r--test/test_2021.cpp7
27 files changed, 153 insertions, 0 deletions
diff --git a/src/2017/day1/README.md b/src/2017/day1/README.md
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/src/2017/day1/README.md
@@ -0,0 +1 @@
+
diff --git a/src/2017/day1/aoc.cpp b/src/2017/day1/aoc.cpp
new file mode 100644
index 0000000..9381e0c
--- /dev/null
+++ b/src/2017/day1/aoc.cpp
@@ -0,0 +1,3 @@
+#include "aoc.h"
+
+namespace aoc2017 {}
diff --git a/src/2017/day1/aoc.h b/src/2017/day1/aoc.h
new file mode 100644
index 0000000..7aacc4c
--- /dev/null
+++ b/src/2017/day1/aoc.h
@@ -0,0 +1,6 @@
+#pragma once
+#include "common.h"
+
+namespace aoc2017 {
+
+}
diff --git a/src/2017/day1/input b/src/2017/day1/input
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/src/2017/day1/input
@@ -0,0 +1 @@
+
diff --git a/src/2018/day1/README.md b/src/2018/day1/README.md
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/src/2018/day1/README.md
@@ -0,0 +1 @@
+
diff --git a/src/2018/day1/aoc.cpp b/src/2018/day1/aoc.cpp
new file mode 100644
index 0000000..1d092ff
--- /dev/null
+++ b/src/2018/day1/aoc.cpp
@@ -0,0 +1,3 @@
+#include "aoc.h"
+
+namespace aoc2018 {}
diff --git a/src/2018/day1/aoc.h b/src/2018/day1/aoc.h
new file mode 100644
index 0000000..4bfdbf3
--- /dev/null
+++ b/src/2018/day1/aoc.h
@@ -0,0 +1,6 @@
+#pragma once
+#include "common.h"
+
+namespace aoc2018 {
+
+}
diff --git a/src/2018/day1/input b/src/2018/day1/input
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/src/2018/day1/input
@@ -0,0 +1 @@
+
diff --git a/src/2019/day1/README.md b/src/2019/day1/README.md
new file mode 100644
index 0000000..64299f9
--- /dev/null
+++ b/src/2019/day1/README.md
@@ -0,0 +1,21 @@
+--- Day 1: No Time for a Taxicab ---
+
+Santa's sleigh uses a very high-precision clock to guide its movements, and the clock's oscillator is regulated by stars. Unfortunately, the stars have been stolen... by the Easter Bunny. To save Christmas, Santa needs you to retrieve all fifty stars by December 25th.
+
+Collect stars by solving puzzles. Two puzzles will be made available on each day in the Advent calendar; the second puzzle is unlocked when you complete the first. Each puzzle grants one star. Good luck!
+
+You're airdropped near Easter Bunny Headquarters in a city somewhere. "Near", unfortunately, is as close as you can get - the instructions on the Easter Bunny Recruiting Document the Elves intercepted start here, and nobody had time to work them out further.
+
+The Document indicates that you should start at the given coordinates (where you just landed) and face North. Then, follow the provided sequence: either turn left (L) or right (R) 90 degrees, then walk forward the given number of blocks, ending at a new intersection.
+
+There's no time to follow such ridiculous instructions on foot, though, so you take a moment and work out the destination. Given that you can only walk on the street grid of the city, how far is the shortest path to the destination?
+
+For example:
+
+ Following R2, L3 leaves you 2 blocks East and 3 blocks North, or 5 blocks away.
+ R2, R2, R2 leaves you 2 blocks due South of your starting position, which is 2 blocks away.
+ R5, L5, R5, R3 leaves you 12 blocks away.
+
+How many blocks away is Easter Bunny HQ?
+
+
diff --git a/src/2019/day1/aoc.cpp b/src/2019/day1/aoc.cpp
new file mode 100644
index 0000000..26fed89
--- /dev/null
+++ b/src/2019/day1/aoc.cpp
@@ -0,0 +1,3 @@
+#include "aoc.h"
+
+namespace aoc2019 {}
diff --git a/src/2019/day1/aoc.h b/src/2019/day1/aoc.h
new file mode 100644
index 0000000..95823fe
--- /dev/null
+++ b/src/2019/day1/aoc.h
@@ -0,0 +1,6 @@
+#pragma once
+#include "common.h"
+
+namespace aoc2016 {
+
+}
diff --git a/src/2019/day1/input b/src/2019/day1/input
new file mode 100644
index 0000000..22adf2a
--- /dev/null
+++ b/src/2019/day1/input
@@ -0,0 +1 @@
+R1, L3, R5, R5, R5, L4, R5, R1, R2, L1, L1, R5, R1, L3, L5, L2, R4, L1, R4, R5, L3, R5, L1, R3, L5, R1, L2, R1, L5, L1, R1, R4, R1, L1, L3, R3, R5, L3, R4, L4, R5, L5, L1, L2, R4, R3, R3, L185, R3, R4, L5, L4, R48, R1, R2, L1, R1, L4, L4, R77, R5, L2, R192, R2, R5, L4, L5, L3, R2, L4, R1, L5, R5, R4, R1, R2, L3, R4, R4, L2, L4, L3, R5, R4, L2, L1, L3, R1, R5, R5, R2, L5, L2, L3, L4, R2, R1, L4, L1, R1, R5, R3, R3, R4, L1, L4, R1, L2, R3, L3, L2, L1, L2, L2, L1, L2, R3, R1, L4, R1, L1, L4, R1, L2, L5, R3, L5, L2, L2, L3, R1, L4, R1, R1, R2, L1, L4, L4, R2, R2, R2, R2, R5, R1, L1, L4, L5, R2, R4, L3, L5, R2, R3, L4, L1, R2, R3, R5, L2, L3, R3, R1, R3
diff --git a/src/2020/day1/README.md b/src/2020/day1/README.md
new file mode 100644
index 0000000..64299f9
--- /dev/null
+++ b/src/2020/day1/README.md
@@ -0,0 +1,21 @@
+--- Day 1: No Time for a Taxicab ---
+
+Santa's sleigh uses a very high-precision clock to guide its movements, and the clock's oscillator is regulated by stars. Unfortunately, the stars have been stolen... by the Easter Bunny. To save Christmas, Santa needs you to retrieve all fifty stars by December 25th.
+
+Collect stars by solving puzzles. Two puzzles will be made available on each day in the Advent calendar; the second puzzle is unlocked when you complete the first. Each puzzle grants one star. Good luck!
+
+You're airdropped near Easter Bunny Headquarters in a city somewhere. "Near", unfortunately, is as close as you can get - the instructions on the Easter Bunny Recruiting Document the Elves intercepted start here, and nobody had time to work them out further.
+
+The Document indicates that you should start at the given coordinates (where you just landed) and face North. Then, follow the provided sequence: either turn left (L) or right (R) 90 degrees, then walk forward the given number of blocks, ending at a new intersection.
+
+There's no time to follow such ridiculous instructions on foot, though, so you take a moment and work out the destination. Given that you can only walk on the street grid of the city, how far is the shortest path to the destination?
+
+For example:
+
+ Following R2, L3 leaves you 2 blocks East and 3 blocks North, or 5 blocks away.
+ R2, R2, R2 leaves you 2 blocks due South of your starting position, which is 2 blocks away.
+ R5, L5, R5, R3 leaves you 12 blocks away.
+
+How many blocks away is Easter Bunny HQ?
+
+
diff --git a/src/2020/day1/aoc.cpp b/src/2020/day1/aoc.cpp
new file mode 100644
index 0000000..a57fb7c
--- /dev/null
+++ b/src/2020/day1/aoc.cpp
@@ -0,0 +1,3 @@
+#include "aoc.h"
+
+namespace aoc2020 {}
diff --git a/src/2020/day1/aoc.h b/src/2020/day1/aoc.h
new file mode 100644
index 0000000..c5ad3d1
--- /dev/null
+++ b/src/2020/day1/aoc.h
@@ -0,0 +1,6 @@
+#pragma once
+#include "common.h"
+
+namespace aoc2020 {
+
+}
diff --git a/src/2020/day1/input b/src/2020/day1/input
new file mode 100644
index 0000000..22adf2a
--- /dev/null
+++ b/src/2020/day1/input
@@ -0,0 +1 @@
+R1, L3, R5, R5, R5, L4, R5, R1, R2, L1, L1, R5, R1, L3, L5, L2, R4, L1, R4, R5, L3, R5, L1, R3, L5, R1, L2, R1, L5, L1, R1, R4, R1, L1, L3, R3, R5, L3, R4, L4, R5, L5, L1, L2, R4, R3, R3, L185, R3, R4, L5, L4, R48, R1, R2, L1, R1, L4, L4, R77, R5, L2, R192, R2, R5, L4, L5, L3, R2, L4, R1, L5, R5, R4, R1, R2, L3, R4, R4, L2, L4, L3, R5, R4, L2, L1, L3, R1, R5, R5, R2, L5, L2, L3, L4, R2, R1, L4, L1, R1, R5, R3, R3, R4, L1, L4, R1, L2, R3, L3, L2, L1, L2, L2, L1, L2, R3, R1, L4, R1, L1, L4, R1, L2, L5, R3, L5, L2, L2, L3, R1, L4, R1, R1, R2, L1, L4, L4, R2, R2, R2, R2, R5, R1, L1, L4, L5, R2, R4, L3, L5, R2, R3, L4, L1, R2, R3, R5, L2, L3, R3, R1, R3
diff --git a/src/2021/day1/README.md b/src/2021/day1/README.md
new file mode 100644
index 0000000..64299f9
--- /dev/null
+++ b/src/2021/day1/README.md
@@ -0,0 +1,21 @@
+--- Day 1: No Time for a Taxicab ---
+
+Santa's sleigh uses a very high-precision clock to guide its movements, and the clock's oscillator is regulated by stars. Unfortunately, the stars have been stolen... by the Easter Bunny. To save Christmas, Santa needs you to retrieve all fifty stars by December 25th.
+
+Collect stars by solving puzzles. Two puzzles will be made available on each day in the Advent calendar; the second puzzle is unlocked when you complete the first. Each puzzle grants one star. Good luck!
+
+You're airdropped near Easter Bunny Headquarters in a city somewhere. "Near", unfortunately, is as close as you can get - the instructions on the Easter Bunny Recruiting Document the Elves intercepted start here, and nobody had time to work them out further.
+
+The Document indicates that you should start at the given coordinates (where you just landed) and face North. Then, follow the provided sequence: either turn left (L) or right (R) 90 degrees, then walk forward the given number of blocks, ending at a new intersection.
+
+There's no time to follow such ridiculous instructions on foot, though, so you take a moment and work out the destination. Given that you can only walk on the street grid of the city, how far is the shortest path to the destination?
+
+For example:
+
+ Following R2, L3 leaves you 2 blocks East and 3 blocks North, or 5 blocks away.
+ R2, R2, R2 leaves you 2 blocks due South of your starting position, which is 2 blocks away.
+ R5, L5, R5, R3 leaves you 12 blocks away.
+
+How many blocks away is Easter Bunny HQ?
+
+
diff --git a/src/2021/day1/aoc.cpp b/src/2021/day1/aoc.cpp
new file mode 100644
index 0000000..5f8b1ce
--- /dev/null
+++ b/src/2021/day1/aoc.cpp
@@ -0,0 +1,3 @@
+#include "aoc.h"
+
+namespace aoc2021 {}
diff --git a/src/2021/day1/aoc.h b/src/2021/day1/aoc.h
new file mode 100644
index 0000000..cd205cd
--- /dev/null
+++ b/src/2021/day1/aoc.h
@@ -0,0 +1,6 @@
+#pragma once
+#include "common.h"
+
+namespace aoc2021 {
+
+}
diff --git a/src/2021/day1/input b/src/2021/day1/input
new file mode 100644
index 0000000..22adf2a
--- /dev/null
+++ b/src/2021/day1/input
@@ -0,0 +1 @@
+R1, L3, R5, R5, R5, L4, R5, R1, R2, L1, L1, R5, R1, L3, L5, L2, R4, L1, R4, R5, L3, R5, L1, R3, L5, R1, L2, R1, L5, L1, R1, R4, R1, L1, L3, R3, R5, L3, R4, L4, R5, L5, L1, L2, R4, R3, R3, L185, R3, R4, L5, L4, R48, R1, R2, L1, R1, L4, L4, R77, R5, L2, R192, R2, R5, L4, L5, L3, R2, L4, R1, L5, R5, R4, R1, R2, L3, R4, R4, L2, L4, L3, R5, R4, L2, L1, L3, R1, R5, R5, R2, L5, L2, L3, L4, R2, R1, L4, L1, R1, R5, R3, R3, R4, L1, L4, R1, L2, R3, L3, L2, L1, L2, L2, L1, L2, R3, R1, L4, R1, L1, L4, R1, L2, L5, R3, L5, L2, L2, L3, R1, L4, R1, R1, R2, L1, L4, L4, R2, R2, R2, R2, R5, R1, L1, L4, L5, R2, R4, L3, L5, R2, R3, L4, L1, R2, R3, R5, L2, L3, R3, R1, R3
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1603ee8..1ef32e0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -24,6 +24,11 @@ set(SOLUTION_FILES
"2015/day22/aoc.cpp"
"2016/day1/aoc.cpp"
+ "2017/day1/aoc.cpp"
+ "2018/day1/aoc.cpp"
+ "2019/day1/aoc.cpp"
+ "2020/day1/aoc.cpp"
+ "2021/day1/aoc.cpp"
)
add_library(solution SHARED ${SOLUTION_FILES})
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index d6d67e6..f5535f5 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -3,6 +3,11 @@ set(TEST_FILES
test_common.cpp
test_2015.cpp
test_2016.cpp
+ test_2017.cpp
+ test_2018.cpp
+ test_2019.cpp
+ test_2020.cpp
+ test_2021.cpp
)
add_executable(aoc ${TEST_FILES})
diff --git a/test/test_2017.cpp b/test/test_2017.cpp
new file mode 100644
index 0000000..d062697
--- /dev/null
+++ b/test/test_2017.cpp
@@ -0,0 +1,7 @@
+#include "2017/day1/aoc.h"
+#include "catch.hpp"
+#include <stdio.h>
+
+TEST_CASE("", "[day1]") {
+ // line_view lv = load_file("../src/2017/day1/input");
+}
diff --git a/test/test_2018.cpp b/test/test_2018.cpp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/test_2018.cpp
diff --git a/test/test_2019.cpp b/test/test_2019.cpp
new file mode 100644
index 0000000..428c067
--- /dev/null
+++ b/test/test_2019.cpp
@@ -0,0 +1,7 @@
+#include "2019/day1/aoc.h"
+#include "catch.hpp"
+#include <stdio.h>
+
+TEST_CASE("", "[day1]") {
+ // line_view lv = load_file("../src/2019/day1/input");
+}
diff --git a/test/test_2020.cpp b/test/test_2020.cpp
new file mode 100644
index 0000000..e1bb716
--- /dev/null
+++ b/test/test_2020.cpp
@@ -0,0 +1,7 @@
+#include "2020/day1/aoc.h"
+#include "catch.hpp"
+#include <stdio.h>
+
+TEST_CASE("", "[day1]") {
+ // line_view lv = load_file("../src/2020/day1/input");
+}
diff --git a/test/test_2021.cpp b/test/test_2021.cpp
new file mode 100644
index 0000000..4709dac
--- /dev/null
+++ b/test/test_2021.cpp
@@ -0,0 +1,7 @@
+#include "2021/day1/aoc.h"
+#include "catch.hpp"
+#include <stdio.h>
+
+TEST_CASE("", "[day1]") {
+ // line_view lv = load_file("../src/2021/day1/input");
+}