Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 2.2 KB

README.md

File metadata and controls

40 lines (30 loc) · 2.2 KB

Advent of Code

Collection of my Advent of Code (AOC) repositories. For codes before 2023, tap on the cards to redirect you to the respective repository!

2015 2016 2017 2018 2019 2020 2021 2022

Note to Self

export X=... # day number, 2 digits
export Y=... # year

# Note that .in files are hidden but it should be within Day-<X>/<X>.in

# Python
cd ~/advent-of-code/aoc-$Y/Day-$X/Python && python main.py < ../$X.in && cd ../../..

# JavaScript
cd ~/advent-of-code/aoc-$Y/Day-$X/JavaScript && node main.js < ../$X.in && cd ../../..

# Java
cd ~/advent-of-code/aoc-$Y/Day-$X/Java && javac Main.java && java Main < ../$X.in && cd ../../..

# C++
cd ~/advent-of-code/aoc-$Y/Day-$X/C++ && g++ -o mainc main.cpp && ./mainc < ../$X.in && cd ../../..

# Haskell
cd ~/advent-of-code/aoc-$Y/Day-$X/Haskell && runhaskell main.hs && cd ../../..

# Rust
cd ~/advent-of-code/aoc-$Y/Day-$X/Rust && rustc main.rs && ./main < ../$X.in && cd ../../..

# Ruby
cd ~/advent-of-code/aoc-$Y/Day-$X/Ruby && ruby main.rb < ../$X.in && cd ../../..