Commit Graph

591 Commits

Author SHA1 Message Date
30d1a16075 Collect into vec for nicer vectorization 2022-12-02 09:52:09 +01:00
256d351f8e Implement day 2 2022 2022-12-02 09:06:59 +01:00
48594a75e6 Make parsers more robust 2022-12-01 11:28:59 +01:00
85a51b13c1 Implement 2022 day 1 2022-12-01 09:40:00 +01:00
2ae2d6baa8 Merge pull request #4 from bertptrs/setup-2022 2022-11-30 18:08:54 +01:00
4a55e53182 Update README and references 2022-11-24 08:23:58 +01:00
af0897300d Add caching to CI pipeline for speed 2022-11-05 16:17:47 +01:00
cabae7b1fd Convert 2021 CI to 2022 2022-11-05 16:17:47 +01:00
0635141ac6 Add skeleton for 2022 2022-11-05 16:17:47 +01:00
d9d5947c3b Replace unnecessary Vec with slice 2022-06-07 08:32:59 +02:00
cc8b4ce353 Update vulnerable dependencies
Not that this will affect anyone, but it's nice anyway.
2022-06-07 08:25:30 +02:00
0b91da04b3 Add benchmarking plots 2022-01-09 18:41:02 +01:00
dba146b299 Avoid instantiating translated sets 2022-01-09 15:45:22 +01:00
33111615be Directly infer matched pivot 2022-01-09 14:22:41 +01:00
04e8a41d98 Use pre-matching strategy
Ensure that both scanners to be matched have a set of enough distances
in common to avoid matching between groups that cannot possibly be
related.
2022-01-08 19:50:16 +01:00
36d76018ba Correct width calculation
The original worked by accident
2022-01-06 23:35:38 +01:00
4172fd0463 Slightly more efficiently pre-allocate bitsets 2022-01-06 23:22:10 +01:00
ad0b4a4659 Use running masks instead of computing one by one 2022-01-06 23:05:41 +01:00
2dab7342f8 Replace sparse map with bitset 2022-01-06 22:52:57 +01:00
edd14a0e3d Update to Clap 3.0.0! 2022-01-02 23:06:32 +01:00
4d7188e1ff Replace hashset with bitset 2022-01-02 22:38:28 +01:00
255edaca79 Implement day 24 2022-01-02 21:47:07 +01:00
8ea716cba8 Properly use TryFrom 2022-01-02 18:49:25 +01:00
601de2c565 Readability 2022-01-02 18:30:13 +01:00
894524bc81 Implement part 2
Turns out you can incorrectly implement the problem and still get the
right answer for part 1. If you then correct it, it's a lot faster.
2022-01-02 18:28:04 +01:00
f19bf28f34 Properly implemented A* estimate 2022-01-02 16:17:01 +01:00
de3a24a87c Implementation day 23 2022-01-02 16:17:01 +01:00
09b590e927 Update southbound comment 2021-12-29 15:39:20 +01:00
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