Solutions to competitive programming problems