Different way to solve the problem.

Unfortunately not the solution
Brute Force
Brute force result we can test against.
Try a c implementation of the problem
Brute force implemented in C
Don't try to compile the all target