Programming challenges: The programming contest training manual