/AdventOfCode2016

My solutions to Advent of Code 2016

Primary LanguageC++

Advent of Code - 2016

All implementations are written in C++, strictly sort of adhering to C++14 guidelines.

Prerequisites

  • clang (>= 3.5)
  • libc++ (>= 3.5)
  • CMake (>= 3.1)
  • macOS or Linux (only two systems I've tested on)

Compiling

  • A compile.sh script is provided
  • Just run it and it should be good to go!

Running

  • 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

Metrics

  • 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

Leaderboard Highlights:

Day Part 1 Part 2 Points
02 31 90 81
09 233 66 35
10 50 44 108
11 112 84 17
12 31 19 152
13 125 79 22
14 145 79 22
19 214 41 60
20 131 40 61
21 89 23 90
22 60 61 81
23 193 88 13
24 25 21 156
25 24 18 160
-- 1058

Detailed Information

Day Lines Code Bytes Chars Time (ms) Source Headers
01 24 14 615 471 0.5518 Day01.cpp Solution.hpp cmath set utility
02 41 24 1228 936 0.3735 Day02.cpp Solution.hpp algorithm initializer_list type_traits utility
03 25 14 555 431 3.8354 Day03.cpp Solution.hpp algorithm iterator vector
04 35 26 1107 819 5.8549 Day04.cpp Solution.hpp algorithm vector
05 37 26 1145 922 1040.5915 Day05.cpp Solution.hpp md5.hpp util.hpp algorithm
06 18 12 511 422 5.9470 Day06.cpp Solution.hpp algorithm array
07 38 26 942 714 5.4559 Day07.cpp Solution.hpp cstring
08 37 28 1567 1262 0.5520 Day08.cpp Solution.hpp unordered_map valarray
09 28 21 687 536 0.3758 Day09.cpp Solution.hpp
10 60 45 1698 1237 1.4471 Day10.cpp Solution.hpp map vector
11 15 9 442 370 0.3987 Day11.cpp Solution.hpp regex
12 9 4 227 200 0.3566 Day12.cpp Solution.hpp assembunny.hpp
13 34 21 1125 905 0.6832 Day13.cpp Solution.hpp io.hpp array set
14 79 52 1893 1441 1192.6846 Day14.cpp Solution.hpp md5.hpp util.hpp algorithm array mutex set vector
15 41 26 1110 869 0.4527 Day15.cpp Solution.hpp numeric vector
16 45 31 1197 960 0.5364 Day16.cpp Solution.hpp
17 34 21 1155 901 38.7939 Day17.cpp Solution.hpp md5.hpp algorithm array list
18 20 13 615 508 1.4500 Day18.cpp Solution.hpp
19 11 6 409 346 0.5743 Day19.cpp Solution.hpp cmath
20 28 19 769 614 2.7715 Day20.cpp Solution.hpp set utility vector
21 40 31 1913 1557 1.2612 Day21.cpp Solution.hpp io.hpp algorithm
22 30 22 915 706 3.8691 Day22.cpp Solution.hpp array
23 9 4 228 201 0.7739 Day23.cpp Solution.hpp assembunny.hpp
24 73 52 2226 1611 4.7776 Day24.cpp Solution.hpp io.hpp algorithm numeric vector
25 21 13 521 426 45.9015 Day25.cpp Solution.hpp assembunny.hpp
TOTAL 832 560 24800 19365 2360.27 Solution.hpp 25 algorithm 9 vector 7 array 5 set 4 md5.hpp 3 assembunny.hpp 3 io.hpp 3 utility 3 util.hpp 2 cmath 2 numeric 2 regex 1 cstring 1 type_traits 1 mutex 1 valarray 1 iterator 1 map 1 list 1 unordered_map 1 initializer_list 1