Problem 1276: Cash Machine (Pass 2). Solved on 07/19/2014.