Coder Social home page Coder Social logo

adventofcode's Introduction

AdventOfCode

This is my repository for Advent of Code 2022. I wanted to participate to train my algorthmics and learn C++20 features in practice.

What is AdventOfCode

This is a competition held every year during the Advent, available on https://adventofcode.com/

Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.

Minimal requirements to build

  • C++20
  • GCC 11.0
  • Boost

How to build

  1. Navigate to project folder
  2. Create build folder

mkdir _build

  1. Create "inputs" folder

mkdir inputs

  1. Navigate to build folder

cd _build

  1. Run cmake

cmake ..

  1. Make project

make

How it works

In main function you can create a class associated to specific day during the competition. After creation you can pass it down to a helper function called "checkResults()" with corresponding input file name. Remember to download input file and put it in inputs folder.

For task five it should look like this:

  • in main.cpp:
int main() {
    TaskFive task;
    checkResults(task, "inputs/taskFive.txt");
}

Example output

Example output for example given in previous section:

Task path is "/mnt/c/projects/AdventOfCode/inputs/taskFive.txt"
For my first star result is: ZWHVFWQWW
Task path is "/mnt/c/projects/AdventOfCode/inputs/taskFive.txt"
For my second star result is: HZFZCCWWV

adventofcode's People

Contributors

pawciow avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.