How to solve competitive programming problems