This is my version of the solution for the 2019 GoogleCodeJam Jamcoins problem. I wouldn't say that my solution is the most efficient and fastest one since it still requires more optimization and revampment but you could use this as a guide in the process of solving the problem.
To test this out yourself you can generate VS Studio solution and project files using premake5 or directly compile the source file using an appropriate compiler. This project had been originially tested on vs2022 but it would probably work with older VS Studio versions and other CPP compilers.
- Update premake5 to the latest version
premake5 vs(version)
- Replace (version) with the VS Studio version that you want the project files to be generated for
I don't really expect much contributions but it would be really nice if you could suggest certain other ways to solve this problem or make the existing code more efficient.