Added Max Consequence problem solution.
The problem solved with dynamic programming.