Solutions to various competitive programming problems