Algorythmic problem from practise round of 2017 HashCode with Google solved by NavySol team
Instruction for this task is available at hashcode.withgoogle.com in practice round of 2017 edition. If it will desapear just let me know, i can sand it to you :-)
Whole magic happens in program.cs file where you can find precise description how this algorithm works.
As specified in description mentioned above, program reads data from file named small.in and outputs results to results.txt in current directory