Skip to content

Commit 6c9496b

Browse files
committed
Document setting timelimit strategy
1 parent ee5b197 commit 6c9496b

File tree

3 files changed

+43
-12
lines changed

3 files changed

+43
-12
lines changed

doc/manual/config-basic.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,4 +140,11 @@ it need not have started yet). You can verify whether the submissions
140140
gave the expected answer in the Judging Verifier, available from
141141
the jury index page.
142142

143+
After this rejudge the whole contest with a higher overshoot, as well as
144+
judge remaining testcases. This rejudging is used to distinguish between the
145+
slowest *Accepted* solution and the fastest *Time Limit Exceeded*.
146+
As a rule of thumb set the timelimit to twice the slowest *Accepted*
147+
solution. The Statistics/Analytics page of each problem has a graphic
148+
overview for those submissions.
149+
143150
.. _ICPC-compatible teams.tsv files: https://ccs-specs.icpc.io/2021-11/ccs_system_requirements#teamstsv

webapp/src/Controller/Jury/JuryMiscController.php

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use App\Controller\API\GeneralInfoController as GI;
66
use App\Controller\BaseController;
77
use App\Entity\Contest;
8+
use App\Entity\ContestProblem;
89
use App\Entity\Judging;
910
use App\Entity\Language;
1011
use App\Entity\Problem;
@@ -247,18 +248,8 @@ public function judgingVerifierAction(Request $request): Response
247248
{
248249
/** @var Submission[] $submissions */
249250
$submissions = [];
250-
if ($contest = $this->dj->getCurrentContest()) {
251-
$submissions = $this->em->createQueryBuilder()
252-
->from(Submission::class, 's')
253-
->join('s.judgings', 'j', Join::WITH, 'j.valid = 1')
254-
->select('s', 'j')
255-
->andWhere('s.contest = :contest')
256-
->andWhere('j.result IS NOT NULL')
257-
->setParameter('contest', $contest)
258-
->getQuery()
259-
->getResult();
260-
}
261-
251+
/** @var ContestProblem[] $problems */
252+
$problems = [];
262253
$numChecked = 0;
263254
$numUnchecked = 0;
264255

@@ -272,6 +263,20 @@ public function judgingVerifierAction(Request $request): Response
272263

273264
$verifyMultiple = (bool)$request->get('verify_multiple', false);
274265

266+
$contest = $this->dj->getCurrentContest();
267+
if ($contest) {
268+
$problems = $contest->getProblems();
269+
$submissions = $this->em->createQueryBuilder()
270+
->from(Submission::class, 's')
271+
->join('s.judgings', 'j', Join::WITH, 'j.valid = 1')
272+
->select('s', 'j')
273+
->andWhere('s.contest = :contest')
274+
->andWhere('j.result IS NOT NULL')
275+
->setParameter('contest', $contest)
276+
->getQuery()
277+
->getResult();
278+
}
279+
275280
foreach ($submissions as $submission) {
276281
// As we only load the needed judging, this will automatically be the first one
277282
/** @var Judging $judging */
@@ -329,6 +334,8 @@ public function judgingVerifierAction(Request $request): Response
329334
'verified' => $verified,
330335
'nomatch' => $nomatch,
331336
'earlier' => $earlier,
337+
'problems' => $problems,
338+
'contestId' => $this->dj->getCurrentContest()?->getCid(),
332339
'verifyMultiple' => $verifyMultiple,
333340
]);
334341
}

webapp/templates/jury/check_judgings.html.twig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,21 @@
9999
{{ checkJudgings.verifyResults('earlier', 'Verified earlier', earlier, true) }}
100100
{{ checkJudgings.verifyResults('nomatch', 'Without magic string', nomatch, true) }}
101101

102+
{% if problems != [] %}
103+
<h2>Problem runtime analytics</h2>
104+
You probably want to <a href="{{ path('jury_contest', {'contestId': contestId }) }}">rejudge</a>
105+
all submissions with a reasonable overshoot and
106+
{%- if not is_granted('ROLE_ADMIN') %} let an admin {% endif %}
107+
judge the
108+
{%- if is_granted('ROLE_ADMIN') %}<a href="{{ path('jury_contest_request_remaining', {'contestId': contestId}) }}">{% endif %}
109+
remaining testcases
110+
{%- if is_granted('ROLE_ADMIN') %}</a>{% endif %}.
111+
After this compare the maximum runtime for <code>Accepted</code>
112+
solutions and tune those against expected <code>Time Limit Exceeded</code> solutions.<br>
113+
{% for p in problems %}
114+
{% set link = path('analysis_problem', {'probid': p.probid, 'view': 'hidden'}) %}
115+
<a href="{{ link }}">{{ p | problemBadge }}</a>
116+
{% endfor %}
117+
{% endif %}
118+
102119
{% endblock %}

0 commit comments

Comments
 (0)