-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Move current solution into 2020 folder. * Add top level readme.
- Loading branch information
Showing
72 changed files
with
261 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
inc/* linguist-vendored | ||
2020/inc/* linguist-vendored |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cmake-build-* |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "Linux", | ||
"includePath": [ | ||
"${workspaceFolder}/**" | ||
], | ||
"defines": [], | ||
"compilerPath": "/usr/bin/g++", | ||
"cppStandard": "c++17", | ||
"intelliSenseMode": "${default}" | ||
} | ||
], | ||
"version": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Build and debug", | ||
"type": "cppdbg", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/cmake-build-debug/adventofcode", | ||
"cwd": "${workspaceFolder}", | ||
"MIMode": "gdb", | ||
"setupCommands": [ | ||
{ | ||
"description": "Enable pretty-printing for gdb", | ||
"text": "-enable-pretty-printing", | ||
"ignoreFailures": true | ||
} | ||
], | ||
"preLaunchTask": "Build (Debug)", | ||
"miDebuggerPath": "/usr/bin/gdb" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"files.exclude": { | ||
".vscode/**": true, | ||
".idea/**": true, | ||
".github/**": true, | ||
".gitignore": true, | ||
".gitattributes": true, | ||
"cmake-build-*/**": true | ||
}, | ||
"C_Cpp.errorSquiggles": "Enabled", | ||
"files.associations": { | ||
"iostream": "cpp", | ||
"algorithm": "cpp", | ||
"sstream": "cpp", | ||
"array": "cpp", | ||
"atomic": "cpp", | ||
"bit": "cpp", | ||
"*.tcc": "cpp", | ||
"cctype": "cpp", | ||
"clocale": "cpp", | ||
"cmath": "cpp", | ||
"cstdarg": "cpp", | ||
"cstddef": "cpp", | ||
"cstdint": "cpp", | ||
"cstdio": "cpp", | ||
"cstdlib": "cpp", | ||
"cwchar": "cpp", | ||
"cwctype": "cpp", | ||
"deque": "cpp", | ||
"unordered_map": "cpp", | ||
"vector": "cpp", | ||
"exception": "cpp", | ||
"functional": "cpp", | ||
"iterator": "cpp", | ||
"memory": "cpp", | ||
"memory_resource": "cpp", | ||
"numeric": "cpp", | ||
"optional": "cpp", | ||
"random": "cpp", | ||
"string": "cpp", | ||
"string_view": "cpp", | ||
"system_error": "cpp", | ||
"tuple": "cpp", | ||
"type_traits": "cpp", | ||
"utility": "cpp", | ||
"fstream": "cpp", | ||
"initializer_list": "cpp", | ||
"iosfwd": "cpp", | ||
"istream": "cpp", | ||
"limits": "cpp", | ||
"new": "cpp", | ||
"ostream": "cpp", | ||
"stdexcept": "cpp", | ||
"streambuf": "cpp", | ||
"typeinfo": "cpp", | ||
"future": "cpp", | ||
"stop_token": "cpp" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "shell", | ||
"label": "Configure (Debug)", | ||
"command": "/usr/bin/cmake", | ||
"args": [ | ||
"-DCMAKE_BUILD_TYPE=Debug", | ||
"-B./cmake-build-debug" | ||
], | ||
"problemMatcher": [], | ||
"group": "build", | ||
"presentation": { | ||
"clear": true, | ||
"showReuseMessage": false | ||
} | ||
}, | ||
{ | ||
"type": "shell", | ||
"label": "Build (Debug)", | ||
"command": "/usr/bin/cmake", | ||
"args": [ | ||
"--build", | ||
"./cmake-build-debug", | ||
"--target", | ||
"all", | ||
"--", | ||
"-j", | ||
"9" | ||
], | ||
"problemMatcher": [ | ||
"$gcc" | ||
], | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"presentation": { | ||
"clear": true, | ||
"showReuseMessage": false | ||
} | ||
}, | ||
{ | ||
"type": "shell", | ||
"label": "Configure (Release)", | ||
"command": "/usr/bin/cmake", | ||
"args": [ | ||
"-DCMAKE_BUILD_TYPE=Release", | ||
"-B./cmake-build-release" | ||
], | ||
"problemMatcher": [], | ||
"group": "build", | ||
"presentation": { | ||
"clear": true, | ||
"showReuseMessage": false | ||
} | ||
}, | ||
{ | ||
"type": "shell", | ||
"label": "Build (Release)", | ||
"command": "/usr/bin/cmake", | ||
"args": [ | ||
"--build", | ||
"./cmake-build-release", | ||
"--target", | ||
"all", | ||
"--", | ||
"-j", | ||
"9" | ||
], | ||
"problemMatcher": [ | ||
"$gcc" | ||
], | ||
"group": "build", | ||
"presentation": { | ||
"clear": true, | ||
"showReuseMessage": false | ||
} | ||
} | ||
] | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Advent of Code 2020 C++ | ||
|
||
From <https://adventofcode.com/2020>. Better late than never ;) | ||
|
||
## System requirements | ||
|
||
- build-essentials (gcc) | ||
- cmake | ||
|
||
Only Linux/gcc has been tested. Other platforms might just work though. | ||
|
||
## Compile & run (Release) | ||
|
||
```bash | ||
./build/make.sh | ||
./cmake-build-release/adventofcode | ||
``` | ||
|
||
The command line arguments from <https://github.com/catchorg/Catch2/blob/devel/docs/command-line.md#specifying-which-tests-to-run> apply to the executable, e.g. use `./cmake-build-release/adventofcode --success "Day 01 - Part 1*"` to run a single test only including showing verbose test results. | ||
|
||
## Recompile & run (Debug) | ||
|
||
```bash | ||
./build/run.sh | ||
``` | ||
|
||
The command line arguments for the test runner (see above) are passed by the `run.sh` script to the executable. | ||
|
||
## Results | ||
|
||
Enjoying all the stars... | ||
|
||
![Final AoC map](https://github.com/jp7677/adventofcode/raw/main/map.png) | ||
|
||
## Other cool solutions | ||
|
||
- <https://github.com/Dricus/adventofcode> | ||
- <https://github.com/StefRave/advent-of-code-2020> | ||
- <https://github.com/ErikSchierboom/advent-of-code> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,9 @@ | ||
# Advent of Code 2020 C++ | ||
# Advent of Code | ||
|
||
From <https://adventofcode.com/2020>. Better late than never ;) | ||
From <https://adventofcode.com/>. Better late than never ;) | ||
|
||
## System requirements | ||
## The years | ||
|
||
- build-essentials (gcc) | ||
- cmake | ||
- Advent of Code 2020 C++ <https://github.com/jp7677/adventofcode/tree/main/2020> | ||
|
||
Only Linux/gcc has been tested. Other platforms might just work though. | ||
|
||
## Compile & run (Release) | ||
|
||
```bash | ||
./build/make.sh | ||
./cmake-build-release/adventofcode | ||
``` | ||
|
||
The command line arguments from <https://github.com/catchorg/Catch2/blob/devel/docs/command-line.md#specifying-which-tests-to-run> apply to the executable, e.g. use `./cmake-build-release/adventofcode --success "Day 01 - Part 1*"` to run a single test only including showing verbose test results. | ||
|
||
## Recompile & run (Debug) | ||
|
||
```bash | ||
./build/run.sh | ||
``` | ||
|
||
The command line arguments for the test runner (see above) are passed by the `run.sh` script to the executable. | ||
|
||
## Results | ||
|
||
Enjoying all the stars... | ||
|
||
![Final AoC map](https://github.com/jp7677/adventofcode/raw/main/map.png) | ||
|
||
## Other cool solutions | ||
|
||
- <https://github.com/Dricus/adventofcode> | ||
- <https://github.com/StefRave/advent-of-code-2020> | ||
- <https://github.com/ErikSchierboom/advent-of-code> | ||
Enjoy the stars... |