Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rqbazan/advent-of-code
🎄 Feliz Navidad, Buon Natale, Happy Merry Christmas
https://github.com/rqbazan/advent-of-code
advent-of-code programming-challenges
Last synced: about 2 months ago
JSON representation
🎄 Feliz Navidad, Buon Natale, Happy Merry Christmas
- Host: GitHub
- URL: https://github.com/rqbazan/advent-of-code
- Owner: rqbazan
- Created: 2023-12-05T04:35:52.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-30T19:03:55.000Z (2 months ago)
- Last Synced: 2024-11-30T20:18:46.293Z (2 months ago)
- Topics: advent-of-code, programming-challenges
- Language: C++
- Homepage:
- Size: 74.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Advent of Code
> 🎄 Feliz Navidad, Buon Natale, Merry Christmas
## Description
This repository contains my solutions for the [Advent of Code](https://adventofcode.com/) challenges.
## Structure
The repository is structured as follows:
- Each solution in well contained in a folder with the following structure:
```
./src//day-/part-
```For instance: [./src/2023/day-01/part-1](./src/2023/day-01/part-1)
- Each solution folder contains the following files:
- `main.cpp`: The solution code.
- `in.txt`: The input data from the challenge.
- `out.txt`: The solution output.
- `submit.txt`: The submitted answer to Advent of Code website.## Run a solution
### Using VSCode
1. Run current file
2. Debug current file
### Manually
1. Go to any solucion folder. For instance:
```bash
cd ./src/2023/day-01/part-1
```2. Run the `main.cpp` file, which is the solution:
```bash
g++ -std=c++20 -o out ./main.cpp && ./out
```3. Check the output:
```bash
cat out.txt
```## Check a solution
There is a script that checks the solutions and compares the output with the submitted answer.
```bash
make check
```Example Output
Checking ./src/2024/day-01/part-2/main.cpp
✅ Check passedChecking ./src/2024/day-01/part-1/main.cpp
✅ Check passedChecking ./src/2023/day-01/part-2/main.cpp
✅ Check passedChecking ./src/2023/day-01/part-1/main.cpp
✅ Check passedChecking ./src/2023/day-04/part-1/main.cpp
✅ Check passedChecking ./src/2023/day-03/part-2/main.cpp
✅ Check passedChecking ./src/2023/day-03/part-1/main.cpp
✅ Check passedChecking ./src/2023/day-02/part-2/main.cpp
✅ Check passedChecking ./src/2023/day-02/part-1/main.cpp
✅ Check passedIt will walk through all the solutions and check if the output is correct.
Optionally, you can pass a specific folder:
```bash
make check 2023/day-01/part-1
```