All implementations are written in C++, mostly adhering to C++17/C++20 guidelines.
- clang (>= 5.0)
- libc++ (>= 5.0)
- CMake (>= 3.11)
- macOS or Linux (only two systems I've tested on)
- Your standard cmake-enabled project
- Invoke
./Advent
to execute all the days
- To run a specific day, invoke
./Advent -f <dayXX>
- To run a specific part, invoke
./Advent -p <1,2>
- To see more detailed help, consult
./Advent --help
- Lines: Number of lines given by
wc
- Code:
Lines
- (# preprocessor lines)
- (lines with no alphanumeric chars)
- Bytes: Number of total characters
- Chars: Number of non-whitespace characters
- Time: Time in milliseconds to execute each part independently (separate runs)
- Source: link to implementation
- Headers: C++ includes used for solution
Day |
Part 1 |
Part 2 |
1 |
52 |
217 |
Day |
Lines |
Code |
Bytes |
Chars |
Time (ms) |
Source |
Headers |
01 |
30 |
16 |
727 |
606 |
33.3431 |
Day01.cpp |
iterator unordered_set vector range/v3/numeric.hpp range/v3/view/cycle.hpp Solution.hpp |
02 |
62 |
40 |
1611 |
1225 |
13.0766 |
Day02.cpp |
algorithm array iterator numeric unordered_map vector Solution.hpp util.hpp |
03 |
71 |
39 |
2024 |
1693 |
9.7002 |
Day03.cpp |
algorithm string vector range/v3/algorithm.hpp range/v3/getlines.hpp range/v3/numeric.hpp range/v3/view/cartesian_product.hpp range/v3/view/filter.hpp range/v3/view/iota.hpp range/v3/view/join.hpp range/v3/view/take_while.hpp range/v3/view/view.hpp Solution.hpp |
04 |
52 |
30 |
1454 |
1153 |
4.9062 |
Day04.cpp |
Solution.hpp unordered_map vector range/v3/algorithm.hpp range/v3/getlines.hpp range/v3/numeric.hpp range/v3/view/slice.hpp |
05 |
49 |
29 |
1232 |
1012 |
21.3260 |
Day05.cpp |
Solution.hpp iterator vector range/v3/algorithm/min.hpp range/v3/view/indices.hpp range/v3/view/remove_if.hpp range/v3/view/repeat.hpp range/v3/view/transform.hpp range/v3/view/zip_with.hpp |
06 |
120 |
77 |
3059 |
2236 |
44.6084 |
Day06.cpp |
Solution.hpp limits iterator set vector range/v3/algorithm/min.hpp range/v3/view/indices.hpp range/v3/view/transform.hpp range/v3/view/zip.hpp |
07 |
73 |
45 |
1767 |
1225 |
1.0425 |
Day07.cpp |
Solution.hpp map set vector range/v3/algorithm/max.hpp range/v3/view/filter.hpp range/v3/view/map.hpp range/v3/getlines.hpp |
08 |
59 |
34 |
1376 |
1087 |
10.7500 |
Day08.cpp |
Solution.hpp iterator vector range/v3/numeric.hpp range/v3/view/transform.hpp range/v3/view/filter.hpp |
09 |
89 |
59 |
1778 |
1313 |
1261.1161 |
Day09.cpp |
Solution.hpp iterator range/v3/algorithm/max.hpp vector |
10 |
111 |
78 |
4057 |
3412 |
2.1783 |
Day10.cpp |
Solution.hpp limits unordered_map vector range/v3/all.hpp |
11 |
60 |
34 |
1758 |
1420 |
42.1620 |
Day11.cpp |
Solution.hpp array range/v3/algorithm/max.hpp range/v3/view/cartesian_product.hpp range/v3/view/indices.hpp range/v3/view/join.hpp range/v3/view/transform.hpp |
12 |
12 |
8 |
285 |
254 |
0.0172 |
Day12.cpp |
Solution.hpp |
13 |
12 |
8 |
285 |
254 |
0.0144 |
Day13.cpp |
Solution.hpp |
14 |
12 |
8 |
285 |
254 |
0.0139 |
Day14.cpp |
Solution.hpp |
15 |
12 |
8 |
285 |
254 |
0.0140 |
Day15.cpp |
Solution.hpp |
16 |
12 |
8 |
285 |
254 |
0.0142 |
Day16.cpp |
Solution.hpp |
17 |
12 |
8 |
285 |
254 |
0.0281 |
Day17.cpp |
Solution.hpp |
18 |
12 |
8 |
285 |
254 |
0.0145 |
Day18.cpp |
Solution.hpp |
19 |
12 |
8 |
285 |
254 |
0.0141 |
Day19.cpp |
Solution.hpp |
20 |
12 |
8 |
285 |
254 |
0.0139 |
Day20.cpp |
Solution.hpp |
21 |
12 |
8 |
285 |
254 |
0.0147 |
Day21.cpp |
Solution.hpp |
22 |
12 |
8 |
285 |
254 |
0.0426 |
Day22.cpp |
Solution.hpp |
23 |
12 |
8 |
285 |
254 |
0.0283 |
Day23.cpp |
Solution.hpp |
24 |
12 |
8 |
285 |
254 |
0.0158 |
Day24.cpp |
Solution.hpp |
25 |
12 |
8 |
285 |
254 |
0.0219 |
Day25.cpp |
Solution.hpp |
TOTAL |
944 |
593 |
24833 |
19938 |
1444.48 |
|
Solution.hpp 25 vector 10 iterator 6 range/v3/view/transform.hpp 4 range/v3/numeric.hpp 4 range/v3/view/indices.hpp 3 range/v3/algorithm/max.hpp 3 unordered_map 3 range/v3/view/filter.hpp 3 range/v3/getlines.hpp 3 range/v3/view/join.hpp 2 set 2 limits 2 algorithm 2 range/v3/view/cartesian_product.hpp 2 array 2 range/v3/algorithm/min.hpp 2 range/v3/algorithm.hpp 2 util.hpp 1 range/v3/view/map.hpp 1 range/v3/view/repeat.hpp 1 numeric 1 range/v3/view/remove_if.hpp 1 range/v3/view/take_while.hpp 1 range/v3/view/zip.hpp 1 unordered_set 1 range/v3/view/zip_with.hpp 1 range/v3/view/view.hpp 1 range/v3/view/cycle.hpp 1 range/v3/view/slice.hpp 1 range/v3/all.hpp 1 range/v3/view/iota.hpp 1 string 1 map 1 |