bert
41d07fa419
Switch loop order for locality.
2019-08-22 12:42:46 +02:00
bert
82dfff21e9
Fix other clippy warnings.
2019-08-22 12:32:07 +02:00
bert
29b5dcdf62
Change signature for solution.
2019-08-22 12:28:52 +02:00
bert
374eda945b
Reduce code duplication.
2019-02-18 15:39:41 +01:00
bert
c16ef40d73
Correct formatting.
2019-02-18 15:13:48 +01:00
bert
171d9fa2e9
Update to new itertools version
2019-02-18 15:08:36 +01:00
bert
d0b325ba6f
Fix day 24 part 2.
2018-12-26 10:11:33 +01:00
bert
20e7117b6c
Clean up day 24.
...
Still doesn't give the right answer, but now it's more readable.
2018-12-25 14:54:34 +01:00
bert
c05b486033
Fix inconsistency in day 23.
...
It works way better when you choose an optimal pivot.
2018-12-25 13:32:08 +01:00
bert
ff36f15ae1
Implement day23 part 2.
2018-12-25 13:26:52 +01:00
bert
22c71dc3f5
Implement day 25.
...
Part 2 was bonkers.
2018-12-25 11:28:58 +01:00
bert
4a5bec0e7d
Add incorrect implementation of day 24 part 2.
2018-12-25 10:53:05 +01:00
bert
439cad4dc8
Implement day 24 part 1.
2018-12-24 08:57:42 +01:00
bert
f78a602d38
Initial atempt at day24.
2018-12-24 08:42:13 +01:00
bert
85538d2fc6
Implement day23 part 1.
2018-12-23 07:08:10 +01:00
bert
a052d3a4fe
Attempt to fix Ubuntu compat issue.
2018-12-22 10:53:51 +01:00
bert
2f0c8ef2d4
Replace format("{}") with .to_string() where possible.
2018-12-22 10:07:14 +01:00
bert
3b825ac933
Move manhattan metric function to trait.
2018-12-22 09:40:09 +01:00
bert
7837567119
Reasonable bounds.
2018-12-22 08:45:31 +01:00
bert
db94abf9f7
Implement A* rather than Dijkstra.
2018-12-22 08:38:18 +01:00
bert
a202faa7b5
Add more intelligent limits to the playing field.
2018-12-22 08:29:39 +01:00
bert
655ce5af18
Implement day 22.
2018-12-22 08:15:53 +01:00
bert
71c18e44e1
Implement day 21.
2018-12-21 13:55:39 +01:00
bert
1355a05d2c
Implement day 20.
2018-12-20 14:21:20 +01:00
bert
1424c5bfbd
Slightly increase optimized section.
2018-12-19 12:30:02 +01:00
bert
9d1fdc63c9
More cleanup.
2018-12-19 08:25:15 +01:00
bert
c554811fda
Clean up day 16 and 19.
...
Day 16 and 19 share the same CPU and now they actually share the same
code for it.
2018-12-19 07:53:09 +01:00
bert
cb99849143
Implement day 19.
...
With nice hotspot optimization for part 2.
2018-12-19 07:12:46 +01:00
bert
1e26ad1168
Correctness.
...
From::from may never fail, so I added an invalid state.
2018-12-18 20:00:40 +01:00
bert
0b69a74cff
Formatting and LOC update.
2018-12-18 12:06:27 +01:00
bert
89816ae2d7
Implement day 18.
...
Curiously, it reminds me of some other day involving plants.
2018-12-18 12:03:05 +01:00
bert
f23624c456
Fix all clippy warnings.
2018-12-17 12:26:31 +01:00
bert
851868bed4
Even more clean up.
...
Removed duplicated code in the descend stage and moved it to different
functions. Also, range finders are no longer technically infinite, but
are assumed to be.
2018-12-17 11:45:23 +01:00
bert
a632bdff10
Clean up.
2018-12-17 08:33:16 +01:00
bert
45a8b38ad4
Implement day 17.
...
Today was a nice exercise, and I got to be somewhat fast too. Number 328/314.
2018-12-17 08:18:25 +01:00
bert
718fd72cef
Implement day 16 part 2.
2018-12-16 16:19:37 +01:00
bert
4fa6998369
Implement day 16 part 1.
2018-12-16 11:12:32 +01:00
bert
7369fd2290
Small improvement to day 15.
2018-12-15 22:25:59 +01:00
bert
14a766f6f2
Implement day 15 part 2.
2018-12-15 22:16:30 +01:00
bert
10918a62ad
Fix day 15 part 1.
2018-12-15 21:12:58 +01:00
bert
ae51e3c114
Clean up and simplify.
...
The idea is that this makes it easier to debug. I'm not sure it does
yet.
2018-12-15 19:12:33 +01:00
bert
44e5c38268
Attempt to fix Ubuntu incompatibility.
2018-12-15 18:11:16 +01:00
bert
baf07a7eaf
Reuse manhattan implementation from common.
2018-12-15 18:08:42 +01:00
bert
069e381aeb
Partial solution for day 15 part 1.
...
Partial in the sense that it doesn't actually work for my input, only
for the samples.
2018-12-15 18:02:16 +01:00
bert
bcccc85073
Reimplement day 14 with infinite streams.
2018-12-14 14:48:53 +01:00
bert
ccdbea4a1c
Off-by-one bug fix
2018-12-14 12:02:27 +01:00
bert
5c4646b323
Clean up.
2018-12-14 11:48:48 +01:00
bert
f4a7b06d47
Reuse input helper.
2018-12-14 11:42:44 +01:00
bert
98da0a9857
Implement day 14.
2018-12-14 11:37:30 +01:00
bert
faf3ad90d9
Make day 12 even more rusty.
2018-12-13 14:55:30 +01:00