All implementations are written in C++, strictly sort of adhering to C++14 guidelines.
- clang (>= 3.5)
- libc++ (>= 3.5)
- CMake (>= 3.1)
- macOS or Linux (only two systems I've tested on)
- A
compile.sh
script is provided - Just run it and it should be good to go!
- 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 5: Placed #60
- Day 8: Placed #14
- Day 10: Placed #64
- Day 17: Placed #68
- Day 20: Placed #33
- Day 23: Placed #83
- Day 24: Placed #62
Day | Lines | Code | Bytes | Chars | Time (ms) | Source | Headers |
---|---|---|---|---|---|---|---|
01 | 8 | 5 | 285 | 219 | 1.1782 |
Day01.cpp | Solution.hpp |
02 | 16 | 10 | 586 | 462 | 6.3465 |
Day02.cpp | algorithm Solution.hpp io.hpp |
03 | 25 | 15 | 622 | 479 | 2.7311 |
Day03.cpp | map tuple Solution.hpp io.hpp |
04 | 16 | 9 | 592 | 480 | 310.0225 |
Day04.cpp | Solution.hpp io.hpp md5.hpp |
05 | 45 | 31 | 1403 | 1053 | 2.0288 |
Day05.cpp | array climits Solution.hpp io.hpp |
06 | 25 | 17 | 957 | 723 | 16.9409 |
Day06.cpp | array Solution.hpp io.hpp |
07 | 61 | 42 | 2025 | 1488 | 11.0841 |
Day07.cpp | unordered_map Solution.hpp io.hpp |
08 | 18 | 12 | 546 | 412 | 6.3003 |
Day08.cpp | Solution.hpp io.hpp |
09 | 38 | 26 | 1334 | 1051 | 13.6350 |
Day09.cpp | limits set unordered_map vector Solution.hpp io.hpp |
10 | 22 | 13 | 609 | 436 | 32.3288 |
Day10.cpp | vector Solution.hpp io.hpp |
11 | 35 | 23 | 916 | 650 | 18.2054 |
Day11.cpp | Solution.hpp io.hpp |
12 | 34 | 26 | 1029 | 697 | 1.2039 |
Day12.cpp | stack Solution.hpp io.hpp |
13 | 36 | 25 | 1346 | 1064 | 14.8666 |
Day13.cpp | limits set unordered_map vector Solution.hpp io.hpp |
14 | 46 | 30 | 1549 | 1140 | 1.0479 |
Day14.cpp | algorithm vector Solution.hpp io.hpp |
15 | 48 | 31 | 1682 | 1321 | 8.2416 |
Day15.cpp | numeric valarray vector Solution.hpp io.hpp |
16 | 32 | 18 | 1292 | 1047 | 7.2845 |
Day16.cpp | functional unordered_map Solution.hpp io.hpp util.hpp |
17 | 26 | 18 | 908 | 693 | 0.4104 |
Day17.cpp | algorithm array limits vector Solution.hpp io.hpp |
18 | 36 | 23 | 1316 | 1016 | 4.6127 |
Day18.cpp | array Solution.hpp io.hpp |
19 | 28 | 22 | 1066 | 830 | 2.1255 |
Day19.cpp | unordered_map unordered_set Solution.hpp io.hpp |
20 | 16 | 9 | 523 | 387 | 33.6636 |
Day20.cpp | array Solution.hpp io.hpp |
21 | 28 | 20 | 1352 | 1012 | 0.4910 |
Day21.cpp | array cmath Solution.hpp io.hpp |
22 | 72 | 49 | 2257 | 1682 | 5.3560 |
Day22.cpp | limits unordered_set Solution.hpp io.hpp |
23 | 30 | 20 | 1314 | 1027 | 1.2647 |
Day23.cpp | algorithm vector Solution.hpp io.hpp util.hpp |
24 | 31 | 19 | 986 | 767 | 9.6601 |
Day24.cpp | algorithm numeric vector Solution.hpp io.hpp util.hpp |
25 | 24 | 16 | 736 | 536 | 0.2636 |
Day25.cpp | io.hpp Solution.hpp |
TOTAL | 796 | 529 | 27231 | 20672 | 511.294 | Solution.hpp 25 io.hpp 24 vector 8 array 6 algorithm 5 unordered_map 5 limits 4 util.hpp 3 set 2 numeric 2 unordered_set 2 map 1 stack 1 tuple 1 climits 1 cmath 1 valarray 1 md5.hpp 1 functional 1 |