My personal implementations for Advent of Code (AoC)
| Year | Day | Language | Rank part 1 | Rank part 2 | Link |
|---|---|---|---|---|---|
| 2016 | 2 | C++ | 81 | 83 | link |
| 2016 | 20 | C++ | - | 29 | link |
| 2018 | 21 | Rust | 86 | - | link |
Implementations for other languages will hopefully come too some day.
| AoC | Rust |
|---|---|
| Day 1 | main.rs, 1 & 2 |
| Day 2 | main.rs, 1 & 2 |
| Day 3 | main.rs, 1 & 2 |
| Day 4 | main.rs, 1 & 2 |
| Day 5 | main.rs, 1 & 2 |
| Day 6 | main.rs, 1 & 2 |
| Day 7 | main.rs, 1 & 2 |
| Day 8 | main.rs, 1 & 2 |
| Day 9 | main.rs, 1 & 2 |
| Day 10 | main.rs |
| Day 11 | main.rs, 1 & 2 |
| Day 12 | main.rs, 1 & 2 |
| Day 13 | main.rs, 1 & 2 |
| Day 14 | main.rs, 1 & 2 |
| Day 15 | main.rs, 1 & 2 |
| Day 16 | main.rs, 1 & 2 |
| Day 17 | main.rs, 1 & 2 |
| Day 18 | main.rs, 1 & 2 |
| Day 19 | main.rs, 1 & 2 |
| Day 20 | main.rs, 1 & 2 |
| Day 21 | main.rs, 1 & 2 |
| Day 22 | main.rs, 1 & 2 |
| Day 23 | main.rs, 1 & 2 |
| Day 24 | main.rs, 1 & 2 |
| Day 25 | main.rs, 1 |
| AoC | Rust | ion |
|---|---|---|
| Day 1 | 1 & 2 | 1 & 2 |
| Day 2 | 1 & 2 | |
| Day 3 | 1 & 2 | |
| Day 4 | 1 & 2 | |
| Day 5 | 1 & 2 | |
| Day 6 | 1 & 2 | |
| Day 7 | 1 & 2 | |
| Day 8 | 1 & 2 | |
| Day 9 | 1 & 2 | |
| Day 10 | 1 & 2 | |
| Day 12 | 1 & 2 | |
| Day 13 | 1 & 2 | |
| Day 14 | 1 & 2 | |
| Day 15 | 1 & 2 |
| AoC | C++ | Pen & paper |
|---|---|---|
| Day 1 | 1 & 2 | |
| Day 2 | 1 & 2 | |
| Day 3 | 1 & 2 | |
| Day 4 | 1 & 2 | |
| Day 5 | 1 & 2 | |
| Day 6 | 1 & 2 | |
| Day 7 | 1 & 2 | |
| Day 8 | 1 & 2 | |
| Day 9 | 1 & 2 | |
| Day 10 | 1 & 2 | |
| Day 11 | * | |
| Day 12 | 1 & 2 | |
| Day 13 | 1 & 2 | |
| Day 14 | 1 & 2 | |
| Day 15 | 1 & 2 | |
| Day 16 | 1 & 2 | |
| Day 17 | 1 & 2 | |
| Day 18 | 1 & 2 | |
| Day 19 | 1 & 2 | |
| Day 20 | 1 & 2 | |
| Day 21 | 1 & 2 | |
| Day 22 | 1 | 2 |
| Day 23 | 1 & 1 |
* solved and implemented together with Chrissi. See collaborated code in Chrissis Repo here. A port to C++ is in progress.
| AoC | C | C++ | Pen & paper | Rust |
|---|---|---|---|---|
| Day 1 | 1 & 2 | 1 & 2 | ||
| Day 2 | 1 & 2 | 1 & 2 | ||
| Day 3 | 1 & 2 | 1 & 2 | ||
| Day 4 | 1 & 2 | 1 & 2 | ||
| Day 5 | 1 & 2 | 1 & 2 | ||
| Day 6 | 1 & 2 | |||
| Day 7 | 1 & 2 | |||
| Day 8 | 1 & 2 | |||
| Day 9 | 1 & 2 | |||
| Day 10 | 1 & 2 | |||
| Day 11 | 1 & 2 | 1 & 2 | ||
| Day 12 | 1 & 2 | |||
| Day 13 | 1 & 2 | |||
| Day 14 | 1 & 2 | |||
| Day 15 | 1 & 2 | |||
| Day 16 | 1 & 2 | |||
| Day 17 | 1 & 2 | |||
| Day 18 | 1 (optimized) & 2 (optimized) | |||
| Day 19 | 1 & 2 | |||
| Day 20 | 1 & 2 | |||
| Day 21 | 1 & 2 | 1 & 2 | ||
| Day 22 | 1 & 2 | |||
| Day 23 | 1 & 2 | |||
| Day 24 | 1 & 2 | |||
| Day 25 | 1 & 2 |
Beginning from 2016 (maybe, I'll adapt 2015 too some day) I will use the following directory structure:
adventofcode/
├── 20xx
│ ├── _inputs
│ │ └── dayXX
│ │ ├── test.input
│ │ ├── test.solution1
│ │ └── test.solution2
│ ├── _tasks
│ │ └── dayXX.md
│ └── language
│ └── dayXX
│ ├── part1.extension
│ └── part2.extension
├── LICENSE
└── README.md
- Each
_inputs/dayXX/-directory can contain any number of possible input sets.- Each set can have an arbitrary name (use of whitespace-characters is highly discouraged)
- Each
.inputfile should have coresponding.solutionXfiles (WhereXis either1or2and stands for the part the solution is for) - Format of the content of the
.input-files MUST be in the same format as AoC provides it. - Format of the content of the
.solution-files MUST be in the same format as AoC expects it (= a simple string without any metadata). - It is recommended that implementations provide a possibility to chose a specific input set by its name
- Depending on the language, the actual (language-internal) structure may be slightly different and it may contain additional files.
- Where possible (e.g. for object oriented languages), I'll try to keep a single main source file for the whole year/language combination, implementing each day as a class/object with a consistent interface. Note: Only true for 2016cpp. In 2017rust I am using a separate application for each day again. Common code (such as importing) will be placed in an AoC-utils library.
All commit messages should be of the following format (when applicable):
year language day(/part)| Msg
where:
yearis the four digit number of the year the task is from- lists, ranges, and combinations of those, such as
2015, 2017,2015-2017,2016+,2015,2017-2019, andall* are allowed
- lists, ranges, and combinations of those, such as
languageis the language this commit is for- can also be
all* or a comma-separated list, such asc,rust
- can also be
dayis the two-digit specifier of the day the task is from- same rules as for the year apply
partis optional if this commit only affects a specific part- as of now, this can only be
1or2 - this must be ommitted if it affects all parts
- as of now, this can only be
- the separator
|directly follows thedayor optionalpartand is followed by exactly one space before the message Msgshould start with a capital letter- The complete title of the message must not be longer than 72 characters
* all means all elements of this set which are in the repo at this moment.
In this case, the body of the commit message should exactly specify all affected
elements by its identifier.