@@ -136,40 +136,40 @@ protected function calculateScoreboard(): void
136
136
{
137
137
// Calculate matrix and update scores.
138
138
$ 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 ();
142
142
// Skip this row if the team or problem is not known by us.
143
143
if (!array_key_exists ($ teamId , $ this ->teams ) ||
144
144
!array_key_exists ($ probId , $ this ->problems )) {
145
145
continue ;
146
146
}
147
147
148
148
$ penalty = Utils::calcPenaltyTime (
149
- $ scoreRow ->getIsCorrect ($ this ->restricted ),
150
- $ scoreRow ->getSubmissions ($ this ->restricted ),
149
+ $ scoreCell ->getIsCorrect ($ this ->restricted ),
150
+ $ scoreCell ->getSubmissions ($ this ->restricted ),
151
151
$ this ->penaltyTime , $ this ->scoreIsInSeconds
152
152
);
153
153
154
154
$ 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 ),
160
160
penaltyTime: $ penalty ,
161
- runtime: $ scoreRow ->getRuntime ($ this ->restricted ),
162
- numSubmissionsInFreeze: $ scoreRow ->getPending (false ),
161
+ runtime: $ scoreCell ->getRuntime ($ this ->restricted ),
162
+ numSubmissionsInFreeze: $ scoreCell ->getPending (false ),
163
163
);
164
164
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 ),
167
167
$ this ->scoreIsInSeconds );
168
- $ contestProblem = $ this ->problems [$ scoreRow ->getProblem ()->getProbid ()];
168
+ $ contestProblem = $ this ->problems [$ scoreCell ->getProblem ()->getProbid ()];
169
169
$ this ->scores [$ teamId ]->numPoints += $ contestProblem ->getPoints ();
170
170
$ this ->scores [$ teamId ]->solveTimes [] = $ solveTime ;
171
171
$ this ->scores [$ teamId ]->totalTime += $ solveTime + $ penalty ;
172
- $ this ->scores [$ teamId ]->totalRuntime += $ scoreRow ->getRuntime ($ this ->restricted );
172
+ $ this ->scores [$ teamId ]->totalRuntime += $ scoreCell ->getRuntime ($ this ->restricted );
173
173
}
174
174
}
175
175
0 commit comments