Chris Smith
d415992930
Fix edge case
vor 5 Jahren
Chris Smith
724e0b9c46
Day 17
vor 5 Jahren
Chris Smith
c1820b60c5
Just use a sequence not an array
It's about 30% slower, but a lot nicer.
vor 5 Jahren
Chris Smith
877a6cca07
Tidy and optimise day 14 a little
vor 5 Jahren
Chris Smith
d46eb23779
Handle silly trailing new lines
vor 5 Jahren
Chris Smith
8fe21edd1b
Day 16
vor 5 Jahren
Chris Smith
f1e2824734
Minor optimisations
vor 5 Jahren
Chris Smith
c2a8a58817
Might as well use an array if we're pre-sizing it.
vor 5 Jahren
Chris Smith
b103c400c6
Slooowwww day 14
vor 5 Jahren
Chris Smith
9bee0203a0
Unused imports
vor 5 Jahren
Chris Smith
73e59cfc37
Day 13
vor 5 Jahren
Chris Smith
50a54c8a56
Unsatisfying day 12.
vor 5 Jahren
Chris Smith
d137fdb031
Minor day 11 optimisations
Calculate the power inline so we don't have to repeat the rack ID
etc every time; give in and use 1-based arrays instead of mapping
the 1-base back to 0-base.
vor 5 Jahren
Chris Smith
6ce0442f34
Optimise day 10
vor 5 Jahren
Chris Smith
46b2a06b3b
Day 11
vor 5 Jahren
Chris Smith
8e0bb8b3ab
Shave another 10ms off of day 9.
We don't need to store values as we can figure them out from
the memory location.
vor 5 Jahren
Chris Smith
4756cb9e28
Day 10.
Leaderboard position: 70 and 84
vor 5 Jahren
Chris Smith
3a4e408b81
Fix various mistakes with advancing the current pointer
Somehow this got the right answer for most cases.
vor 5 Jahren
Chris Smith
a9936edafc
More insanity in the name of performance.
vor 5 Jahren
Chris Smith
6e97ab6839
Further performance improvements
vor 5 Jahren
Chris Smith
89ccac1647
Use pointers and bare memory allocations. For speed.
vor 5 Jahren
Chris Smith
baf4de4200
Some attempts at day 9 performance improvements
vor 5 Jahren
Chris Smith
f7426d5690
Unused imports
vor 5 Jahren
Chris Smith
77a13266b1
Day 9
Leaderboard position: 124 & 365
vor 5 Jahren
Chris Smith
f61e2149bd
Alpine wasn't that fast...
time(1) just shows fewer decimal places than bash's time, and
I didn't notice!
vor 5 Jahren
Chris Smith
b76570b6c2
Run using bash, lazily compile
vor 5 Jahren
Chris Smith
3d1cfc5734
Remove python, use alpine. Holy speed, batman.
vor 5 Jahren
Chris Smith
8890f63c40
Performance improvement for day 6
vor 5 Jahren
Chris Smith
23507fa07d
Tidying
vor 5 Jahren
Chris Smith
5c5b892740
Use var not pointers
vor 5 Jahren
Chris Smith
faa0f08901
Tidy up day 8
Reverse the input so we can just pop entries off the end as we use
them, instead of tracking offsets horribly.
vor 5 Jahren
Chris Smith
22fc1d269a
Nim day 4
vor 5 Jahren
Chris Smith
5e82552252
Port day 3 to nim
vor 5 Jahren
Chris Smith
24197b6d4c
Add answer files.
vor 5 Jahren
Chris Smith
3f80651927
Style tweaks
vor 5 Jahren
Chris Smith
47bf49da5f
func!
vor 5 Jahren
Chris Smith
09ad330e31
Nim day 2
vor 5 Jahren
Chris Smith
a26c9ec929
Nim day 5
vor 5 Jahren
Chris Smith
3d268eefd7
Day 8
vor 5 Jahren
Chris Smith
d08c31c992
Day 7 performance improvements
- Skip over times when nothing is going to happen
- Instead of storing time remaining and decrementing it each cycle,
store the end time instead
vor 5 Jahren
Chris Smith
7321fcb8e3
Quick and dirty day 7.
This code was brought to you by insomnia.
vor 5 Jahren
Chris Smith
56f04d82c2
Tidy up and increase performance a bit
vor 5 Jahren
Chris Smith
0dcfe098fc
Messy day 6
vor 5 Jahren
Chris Smith
b912574e44
Deal with weird input with trailing LFs.
vor 5 Jahren
Chris Smith
665f0309b3
Day 1 in nim
vor 5 Jahren
Chris Smith
f081393751
Day 5
vor 5 Jahren
Chris Smith
0a752e5dff
Day 4
vor 5 Jahren
Chris Smith
634431a323
Performance improvements
vor 5 Jahren
Chris Smith
9c640c2cbc
Day 3
vor 5 Jahren
Chris Smith
b05a2e6e57
Appease Shane.
vor 5 Jahren