Optimal Algorithm of Rating Assessment of Student Teams during Contests in Mathematic Disciplines during the Educational Process