solutions for falling diamonds, pogo and great wall (code jam 2013)