Solution to recent Google Codejam problems.