Given solution for 1-1

Left out more optimized solution because it requires information not given about problem.