@@ -136,40 +136,40 @@ protected function calculateScoreboard(): void
136136 {
137137 // Calculate matrix and update scores.
138138 $ this ->matrix = [];
139- foreach ($ this ->scoreCache as $ scoreRow ) {
140- $ teamId = $ scoreRow ->getTeam ()->getTeamid ();
141- $ probId = $ scoreRow ->getProblem ()->getProbid ();
139+ foreach ($ this ->scoreCache as $ scoreCell ) {
140+ $ teamId = $ scoreCell ->getTeam ()->getTeamid ();
141+ $ probId = $ scoreCell ->getProblem ()->getProbid ();
142142 // Skip this row if the team or problem is not known by us.
143143 if (!array_key_exists ($ teamId , $ this ->teams ) ||
144144 !array_key_exists ($ probId , $ this ->problems )) {
145145 continue ;
146146 }
147147
148148 $ penalty = Utils::calcPenaltyTime (
149- $ scoreRow ->getIsCorrect ($ this ->restricted ),
150- $ scoreRow ->getSubmissions ($ this ->restricted ),
149+ $ scoreCell ->getIsCorrect ($ this ->restricted ),
150+ $ scoreCell ->getSubmissions ($ this ->restricted ),
151151 $ this ->penaltyTime , $ this ->scoreIsInSeconds
152152 );
153153
154154 $ this ->matrix [$ teamId ][$ probId ] = new ScoreboardMatrixItem (
155- isCorrect: $ scoreRow ->getIsCorrect ($ this ->restricted ),
156- isFirst: $ scoreRow ->getIsCorrect ($ this ->restricted ) && $ scoreRow ->getIsFirstToSolve (),
157- numSubmissions: $ scoreRow ->getSubmissions ($ this ->restricted ),
158- numSubmissionsPending: $ scoreRow ->getPending ($ this ->restricted ),
159- time: $ scoreRow ->getSolveTime ($ this ->restricted ),
155+ isCorrect: $ scoreCell ->getIsCorrect ($ this ->restricted ),
156+ isFirst: $ scoreCell ->getIsCorrect ($ this ->restricted ) && $ scoreCell ->getIsFirstToSolve (),
157+ numSubmissions: $ scoreCell ->getSubmissions ($ this ->restricted ),
158+ numSubmissionsPending: $ scoreCell ->getPending ($ this ->restricted ),
159+ time: $ scoreCell ->getSolveTime ($ this ->restricted ),
160160 penaltyTime: $ penalty ,
161- runtime: $ scoreRow ->getRuntime ($ this ->restricted ),
162- numSubmissionsInFreeze: $ scoreRow ->getPending (false ),
161+ runtime: $ scoreCell ->getRuntime ($ this ->restricted ),
162+ numSubmissionsInFreeze: $ scoreCell ->getPending (false ),
163163 );
164164
165- if ($ scoreRow ->getIsCorrect ($ this ->restricted )) {
166- $ solveTime = Utils::scoretime ($ scoreRow ->getSolveTime ($ this ->restricted ),
165+ if ($ scoreCell ->getIsCorrect ($ this ->restricted )) {
166+ $ solveTime = Utils::scoretime ($ scoreCell ->getSolveTime ($ this ->restricted ),
167167 $ this ->scoreIsInSeconds );
168- $ contestProblem = $ this ->problems [$ scoreRow ->getProblem ()->getProbid ()];
168+ $ contestProblem = $ this ->problems [$ scoreCell ->getProblem ()->getProbid ()];
169169 $ this ->scores [$ teamId ]->numPoints += $ contestProblem ->getPoints ();
170170 $ this ->scores [$ teamId ]->solveTimes [] = $ solveTime ;
171171 $ this ->scores [$ teamId ]->totalTime += $ solveTime + $ penalty ;
172- $ this ->scores [$ teamId ]->totalRuntime += $ scoreRow ->getRuntime ($ this ->restricted );
172+ $ this ->scores [$ teamId ]->totalRuntime += $ scoreCell ->getRuntime ($ this ->restricted );
173173 }
174174 }
175175
0 commit comments