small programming competition style solutions