@@ -87,7 +87,7 @@ public function updateBalloons(
87
87
* @return array<array{data: array{balloonid: int, time: string, problem: string, contestproblem: ContestProblem,
88
88
* team: Team, teamid: int, location: string|null, affiliation: string|null,
89
89
* affiliationid: int, category: string, categoryid: int, total: array<string, ContestProblem>,
90
- * awards: string, done: bool}}>
90
+ * done: bool}}>
91
91
*/
92
92
public function collectBalloonTable (Contest $ contest , bool $ todo = false ): array
93
93
{
@@ -97,13 +97,6 @@ public function collectBalloonTable(Contest $contest, bool $todo = false): array
97
97
$ freezetime = $ contest ->getFreezeTime ();
98
98
}
99
99
100
- // Build a list of teams and the problems they solved first.
101
- $ firstSolved = $ em ->getRepository (ScoreCache::class)->findBy (['is_first_to_solve ' => 1 ]);
102
- $ firstSolvers = [];
103
- foreach ($ firstSolved as $ scoreCache ) {
104
- $ firstSolvers [$ scoreCache ->getTeam ()->getTeamId ()][] = $ scoreCache ->getProblem ()->getProbid ();
105
- }
106
-
107
100
$ query = $ em ->createQueryBuilder ()
108
101
->select ('b ' , 's.submittime ' , 'p.probid ' ,
109
102
't.teamid ' , 's ' , 't ' , 't.location ' ,
@@ -125,23 +118,14 @@ public function collectBalloonTable(Contest $contest, bool $todo = false): array
125
118
->addOrderBy ('s.submittime ' , 'DESC ' );
126
119
127
120
$ balloons = $ query ->getQuery ()->getResult ();
128
- // Loop once over the results to get totals and awards .
129
- $ TOTAL_BALLOONS = $ AWARD_BALLOONS = [];
121
+ // Loop once over the results to get totals.
122
+ $ TOTAL_BALLOONS = [];
130
123
foreach ($ balloons as $ balloonsData ) {
131
124
if ($ balloonsData ['color ' ] === null ) {
132
125
continue ;
133
126
}
134
127
135
128
$ TOTAL_BALLOONS [$ balloonsData ['teamid ' ]][$ balloonsData ['probshortname ' ]] = $ balloonsData [0 ]->getSubmission ()->getContestProblem ();
136
-
137
- // Keep a list of balloons that were first to solve this problem;
138
- // can be multiple, one for each sortorder.
139
- if (in_array ($ balloonsData ['probid ' ], $ firstSolvers [$ balloonsData ['teamid ' ]] ?? [], true )) {
140
- $ AWARD_BALLOONS ['problem ' ][$ balloonsData ['probid ' ]][] = $ balloonsData [0 ]->getBalloonId ();
141
- }
142
- // Keep overwriting this - in the end it'll
143
- // contain the ID of the first balloon in this contest.
144
- $ AWARD_BALLOONS ['contest ' ] = $ balloonsData [0 ]->getBalloonId ();
145
129
}
146
130
147
131
// Loop again to construct table.
@@ -182,15 +166,6 @@ public function collectBalloonTable(Contest $contest, bool $todo = false): array
182
166
ksort ($ TOTAL_BALLOONS [$ balloonsData ['teamid ' ]]);
183
167
$ balloondata ['total ' ] = $ TOTAL_BALLOONS [$ balloonsData ['teamid ' ]];
184
168
185
- $ comments = [];
186
- if ($ AWARD_BALLOONS ['contest ' ] == $ balloonId ) {
187
- $ comments [] = 'first in contest ' ;
188
- } elseif (isset ($ AWARD_BALLOONS ['problem ' ][$ balloonsData ['probid ' ]])
189
- && in_array ($ balloonId , $ AWARD_BALLOONS ['problem ' ][$ balloonsData ['probid ' ]], true )) {
190
- $ comments [] = 'first for problem ' ;
191
- }
192
-
193
- $ balloondata ['awards ' ] = implode ('; ' , $ comments );
194
169
$ balloondata ['done ' ] = $ done ;
195
170
196
171
$ balloons_table [] = [
0 commit comments