rhermes / adventofcode Goto Github PK
View Code? Open in Web Editor NEWMy advent of code solutions
My advent of code solutions
My solution to 2015 Day 24 returns the first solution it finds. In many cases this is right, but there are counter examples:
INPUT: 1 3 5 13 17 23 31 37 53
[1, 23, 37], QE is 851.
[3, 5, 53], QE is 795.
or
INPUT: 1 2 3 6 7 8 9 11 16
[1, 9, 11], QE is 99,
[2, 3, 16], QE is 96.
My initial code can handle this, but my cleaned up version does not. The way to handle this is to keep track of the smallest in the top of the loop and then do the same towards the bottom, but I think this makes the code more ugly, so I'm putting it of until later.
This is the rotation task. I got this correct with a lot of fiddeling, so this will need some serious cleaning up. I want this to be much better than it currently is.
Watching the sand fall would be really nice ;)
Part two of this task is a stable pattern, and so I need to make a general solution to recognize that and compute the answer.
I want to do this one nice, but I'm not in the mood right now.
There are some really nice solutions in the megathread: https://old.reddit.com/r/adventofcode/comments/5hijk5/2016_day_10_solutions/
This day currently takes a lot of time. Low hanging fruit will be to do the hashing in parallel.
This currently runs quite slowly, but it can be sped up a lot, by precomputing the route costs and not running the whole depth search each time.
This is a good exercise in numpy
, which I need. The roll and set operations are optimized in numpy
.
My current implementation is rather slow and it would be cool to try to write a really optimized version of this.
The letters are hardcoded here, so I can look at the outputs from other programs and attempt to create a lookup table for the letters. This will allow me to do this without human intervention :)
This day is currently very slow, especially part two, which currently doesn't finish in reasonable time without pypy
. Part one is going to be a bit hard to optimize, so you might want to leave this one for a rainy day.
I have currently solved this on some weird assumption, but there are more analytical ways of solving this.
Task: https://adventofcode.com/2016/day/21
Megathread: https://old.reddit.com/5ji29h
Right now I have a rather ugly solution which just bruteforces part two. It seems that it is possible to reverse engineer the hash here, so I might want to do that at some point.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.