Templates for competitive programming