Solutions to contest programming problems