Commit Graph

763 Commits

Author SHA1 Message Date
9dacb4c1ae Perform updates in-place 2021-12-29 15:29:21 +01:00
07e03c1630 Implement day 25 2021-12-29 15:09:43 +01:00
3accf9845d Better code reuse, almost generic over dimensions 2021-12-29 14:19:58 +01:00
fd26f58e25 Implement day 22 part 2 (and 1 again) 2021-12-29 14:07:52 +01:00
b2f9898714 Reduce code duplication 2021-12-26 12:32:07 +01:00
d757c389f0 Replace inefficient recursion with iteration 2021-12-26 11:24:45 +01:00
fd561a3e9d Clippy suggestions 2021-12-22 21:16:27 +01:00
2fcdc6b8d2 Brute force day 22 part 1 2021-12-22 21:12:15 +01:00
8a3f0f843c Finally discovered that pos != new_pos 2021-12-22 20:36:58 +01:00
23b5c39838 Add inputs day 21 2021-12-22 20:04:29 +01:00
452f6e5f14 Implement fast day 21 part 1 2021-12-21 09:35:50 +01:00
61fb240622 Avoid 2/3 hashmap lookups 2021-12-20 18:24:37 +01:00
aee25057d6 Avoid allocations 2021-12-20 18:14:36 +01:00
a98332894f Brute force implementation day 20 2021-12-20 18:08:48 +01:00
09e012c082 Add input files day 18 2021-12-19 22:55:11 +01:00
944d3e644a Filter out the worst repetition 2021-12-19 18:38:30 +01:00
d56f4ae8f8 Implement part 2 with the same brute force 2021-12-19 18:33:24 +01:00
53ca8d0043 Implement day 19 part 1
By brute force and lots of it
2021-12-19 18:16:56 +01:00
6506af879a Simplify y-hit iterator 2021-12-18 18:15:11 +01:00
101ebee505 Use dedicated iterator instead of range 2021-12-18 18:15:11 +01:00
cc81a7012b Use math instead of binary search 2021-12-18 17:21:43 +01:00
9c299f140c Tighter bounds for the range of y 2021-12-18 15:01:47 +01:00
ba1b7b693e Use reusable parser wrapper more 2021-12-18 14:54:05 +01:00
7d331f9131 Implement day 18 2021 2021-12-18 14:46:27 +01:00
dfd8b2b985 Partially smart, partially brute-force day 17 2021-12-17 10:04:36 +01:00
0f6167e90f Merge common parts of parsers 2021-12-16 19:26:10 +01:00
3e2a3f5206 Avoid allocating and tracking bits manually 2021-12-16 19:12:34 +01:00
8cc2245492 Optimize hex parser 2021-12-16 18:46:19 +01:00
fb167ef899 Implementation day 16
Not clean but it works.
2021-12-16 09:55:53 +01:00
4240f8fc8c Avoid queueing worse routes 2021-12-15 18:40:20 +01:00
9a4ac427e0 Use Dijkstra instead of A*
The available distance heuristic doesn't save enough steps to offset its
overhead.
2021-12-15 18:29:08 +01:00
c3929a56d8 Slow implementation for day 15 2021-12-15 07:54:14 +01:00
9e37026f30 Remove unnecessary indexing 2021-12-14 19:54:45 +01:00
a926243f0d Improve "winning" logic
You don't need to check every possible win condition, just the one you
touched.
2021-12-14 19:51:57 +01:00
a35ae82548 Replace unnecessary HashMap and allocations 2021-12-14 19:39:00 +01:00
8a0b72f111 Implementation day 14 2021 2021-12-14 09:25:38 +01:00
b5866b2d8a Modify points in-place
Thanks to skius from libera##rust for the idea
2021-12-13 22:55:14 +01:00
554683bc64 Actually apply nom 2021-12-13 22:20:02 +01:00
1031a8cdbb Avoid allocating the final buffer twice 2021-12-13 21:40:00 +01:00
5c764f6627 Don't use silly hashsets 2021-12-13 21:34:48 +01:00
ffe8d27469 Clean up day 13 a little. 2021-12-13 08:52:57 +01:00
d471f170b3 Very dirty solution day 13 2021-12-13 08:50:00 +01:00
07cbf6cf53 Fix upcoming clippy warning 2021-12-12 15:56:05 +01:00
6e3252ce5a Add formal benchmarking code 2021-12-12 15:33:52 +01:00
0897e2e907 Implement day 12 part 2 2021-12-12 11:31:54 +01:00
4d1fdd9cc0 Implement day 12 part 1 2021-12-12 11:09:14 +01:00
84c160cf54 Simplify part 2 2021-12-11 17:20:22 +01:00
440d454911 Implement day 11 2021-12-11 13:56:10 +01:00
50cd6d8171 Implementation day 10 2021 2021-12-10 10:46:02 +01:00
dde9c0adbf Update to RC version of clap
Deriving a parser has become an opt-in feature so we need to enable
that.
2021-12-09 12:14:15 +01:00