Expanded greedy algorithm in a super ugly way to attempt greediness test for both choices before choosing