Skip to content

Latest commit

 

History

History

Advent of Code 2018 solved in Rust

Link to AoC 2018

Advent of Code
        //2018

--- day01:
Resulting frequency is: 599
First frequency reached twice is: 81204
Elapsed: 9.349ms
--- day02:
Checksum: 247 * 36 = 8892
zihwtxagsifpbsnwleydukjmqv
zihwtxagwifpbsnwleydukjmqv
Elapsed: 395.959µs
--- day03:
There are 111326 overlapping inches
Claim 1019 is intact
Elapsed: 2.997291ms
--- day04:
The most sleeping guard is #2663 with 471 minutes slept
The best minute is 38 with 13 days asleep
2663 x 38 = 101194
Guard #2917 spent the minute 35 asleep more than any other guard or minute
2917 x 35 = 102095
Elapsed: 1.355042ms
--- day05:
9288 units remain after fully reacting the polymer
5844 is the shortest polymer we can produce by omitting units
Elapsed: 15.567916ms
--- day06:
The largest area's size is 3604
There are 46563 points with distance from all locations < 10000
Elapsed: 13.498958ms
--- day07:
BCKMSDVQcGHJRXFYZOAULPIEWTN
It will take 5 workers 0 seconds
Elapsed: 1.142583ms
--- day08:
43996
35189
Elapsed: 726.334µs
--- day09:
390592
3277920293
Elapsed: 61.419417ms
--- day10:
######..#....#....##....#.......#.......#....#..#.......#####.
#.......#...#....#..#...#.......#.......#...#...#.......#....#
#.......#..#....#....#..#.......#.......#..#....#.......#....#
#.......#.#.....#....#..#.......#.......#.#.....#.......#....#
#####...##......#....#..#.......#.......##......#.......#####.
#.......##......######..#.......#.......##......#.......#....#
#.......#.#.....#....#..#.......#.......#.#.....#.......#....#
#.......#..#....#....#..#.......#.......#..#....#.......#....#
#.......#...#...#....#..#.......#.......#...#...#.......#....#
######..#....#..#....#..######..######..#....#..######..#####.
It took 10227 seconds for the message to appear
Elapsed: 24.936791ms
--- day11:
21,22 is the coord of 3x3 square with largest total power 34
235,288 is the coord of 13x13 square with largest total power 147
Elapsed: 7.698625ms
--- day12:
After 20 generations, the indexes of the pots with flower sum up to 2823
The cycle starts to repeat after 123 generations
Afterwards, each new generation adds 58 to the pot flower sum
After 50000000000 generations, the indexes of the pots with flower sum up to 2900000001856
Elapsed: 4.150875ms
--- day13:
First collision happens at 14,42
Last remaining cart ends up at 8,7
Elapsed: 9.998375ms
--- day14:
1631191756
20219475
Elapsed: 5.774668833s
--- day15:
250648
42224
Elapsed: 1.418345209s
--- day16:
614
656
Elapsed: 2.44325ms
--- day17:
31641
26321
Elapsed: 28.233125ms
--- day18:
638400
195952
Elapsed: 37.302167ms
--- day19:
912
10576224
Elapsed: 187.39475ms
--- day20:
3721
8613
Elapsed: 28.014875ms
--- day21:
6619857
9547924
Elapsed: 78.031725208s
--- day22:
8090
992
Elapsed: 503.106084ms
--- day23:
430
80250793
Elapsed: 76.759166ms
--- day24:
29865
2444
Elapsed: 5.921667ms
--- day25:
394
Elapsed: 5.824666ms
./target/release/advent-of-code 2018 all  85.49s user 0.37s system 99% cpu 1:26.26 total