https://asrp.github.io/blog/gcj_qual2017