This is a solution for Google's Hash Code 2020 competition.
This is my first coding competition as I've never had the urge to try it. But a friend wanted to try it so we formed a two member team and decided to have fun.
There isn't a lot of time: 4h to read and understand the problem, write the code, submit it and iterate on the idea.
The code produces the final score of 22.709.246 points. For comparison, the winner of 4 hours of competition produces 27.203.691 points.
All in all, we had fun :)
Written using latest Python 3 at the time (3.8.1), but any could be easily modified to run on any python.
A single input file can be processed with:
./books.py input-file > output-file
Run all input files with:
./runall.sh
which will process all input files from data
directory and write
result files to output
.
- Igor Lulić - the math guy
- Sasha Matijasic - me, the coding guy
The code is licensed under MIT licence.