Coding contest problems and solutions