some solutions to programming contests