dirty solution for seamcarver. correctness - 89.17