Skip to content

dtomvan/aoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solutions

Running the solutions:

# debug build
$ cargo <year> [solution...]
# release build
$ cargo r<year> [solution...]

AOC 2022

These are the coming soon™ solutions to AoC 2022. Benchmarks: here.

$ cargo r2022 1 2 3 4 5 6

##############
## aoc_2022 ##
##############

=== Day 01 ===
From https://adventofcode.com/2022/day/1
Part 1: 68923
Part 2: 200044
Took 59 μs
Lines of code: 10

=== Day 02 ===
From https://adventofcode.com/2022/day/2
Part 1: 15632
Part 2: 14416
Took 127 μs
Lines of code: 29

=== Day 03 ===
From https://adventofcode.com/2022/day/3
Part 1: 7742
Part 2: 2276
Took 96 μs
Lines of code: 18

=== Day 04 ===
From https://adventofcode.com/2022/day/4
Part 1: 602
Part 2: 891
Took 111 μs
Lines of code: 15

=== Day 05 ===
From https://adventofcode.com/2022/day/5
Part 1: QPJPLMNNR
Part 2: BQDNWJPVJ
Took 89 μs
Lines of code: 34

=== Day 06 ===
From https://adventofcode.com/2022/day/6
Part 1: 1912
Part 2: 2122
Took 500 μs
Lines of code: 8

=== Day 07 ===
From https://adventofcode.com/2022/day/7
Part 1: 1667443
Part 2: 8998590
Took 2812 μs
Lines of code: 50

=== Day 08 ===
From https://adventofcode.com/2022/day/8
Part 1: 1672
Part 2: 327180
Took 6952 μs
Lines of code: 42

AOC 2021

These are the solutions I made in 2021. (I only got to 14) Benchmarks: here.

$ cargo r2021 1 2 3 4 5 6 7 8 9 10 11 12 13 14

##############
## aoc_2021 ##
##############

=== Day 01 ===
From https://adventofcode.com/2021/day/1
Part 1: 1446
Part 2: 1486
Took 46 μs
Lines of code: 14

=== Day 02 ===
From https://adventofcode.com/2021/day/2
Part 1: 2019945
Part 2: 1599311480
Took 62 μs
Lines of code: 23

=== Day 03 ===
From https://adventofcode.com/2021/day/3
Part 1: 3958484
Part 2: 1613181
Took 57 μs
Lines of code: 39

=== Day 04 ===
From https://adventofcode.com/2021/day/4
Part 1: 32844
Part 2: 4920
Took 3485 μs
Lines of code: 123

=== Day 05 ===
From https://adventofcode.com/2021/day/5
Part 1: 4655
Part 2: 20500
Took 21187 μs
Lines of code: 42

=== Day 06 ===
From https://adventofcode.com/2021/day/6
Part 1: 383160
Part 2: 1721148811504
Took 5 μs
Lines of code: 27

=== Day 07 ===
From https://adventofcode.com/2021/day/7
Part 1: 343605
Part 2: 96744904
Took 57 μs
Lines of code: 22

=== Day 08 ===
From https://adventofcode.com/2021/day/8
Part 1: 409
Part 2: 1024649
Took 209 μs
Lines of code: 46

=== Day 09 ===
From https://adventofcode.com/2021/day/9
Part 1: 475
Part 2: 1092012
Took 1544 μs
Lines of code: 66

=== Day 10 ===
From https://adventofcode.com/2021/day/10
Part 1: 318081
Part 2: 4361305341
Took 86 μs
Lines of code: 43

=== Day 11 ===
From https://adventofcode.com/2021/day/11
Part 1: 1669
Part 2: 351
Took 1358 μs
Lines of code: 82

=== Day 12 ===
From https://adventofcode.com/2021/day/12
Part 1: 4241
Part 2: 122134
Took 74092 μs
Lines of code: 40

=== Day 13 ===
From https://adventofcode.com/2021/day/13
Part 1: 664
Part 2: 
#### ####   ## #  # #### #    ###  #   
#    #       # # #     # #    #  # #   
###  ###     # ##     #  #    ###  #   
#    #       # # #   #   #    #  # #   
#    #    #  # # #  #    #    #  # #   
#### #     ##  #  # #### #### ###  ####

Took 159 μs
Lines of code: 68

=== Day 14 ===
From https://adventofcode.com/2021/day/14
Part 1: 2851
Part 2: 10002813279337
Took 1052 μs
Lines of code: 57