voivoid / advent-of-code

Advent Of Code in modern C++ with range-v3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Advent of Code in modern C++

Advent of Code ( https://adventofcode.com ) 2015-2019 solutions using c++-17 with wide usage of boost and ranges-v3

Prerequisites

  • C++17 compiler ( tested with gcc 10.2, clang 11.0, MSVC 16.8 )
  • cmake 3.13 or later
  • git

Build

$ git clone https://github.com/voivoid/advent-of-code/
$ mkdir advent-of-code-build
$ cd advent-of-code-build
$ cmake -DCMAKE_BUILD_TYPE=RELEASE ../advent-of-code
$ cmake --build . -- -j4

During the build several thirdparty libraries ( boost, rangev3, json for modern c++ ) will be downloaded in the build directory

Tests

$ ctest -j4

Solve Problem

$ ./app/AocApp 2015_01_1 < ../advent-of-code/tests/input/2015_01
280
$ ./app/AocApp 2015_01_2 < ../advent-of-code/tests/input/2015_01
1797

Sources

clickable:

Day 2015 2016 2017 2018 2019
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

About

Advent Of Code in modern C++ with range-v3

License:MIT License


Languages

Language:C++ 96.0%Language:CMake 4.0%Language:C 0.0%