Skip to content

Commit b6b7112

Browse files
committed
Document setting timelimit strategy
1 parent b8b85af commit b6b7112

File tree

3 files changed

+37
-12
lines changed

3 files changed

+37
-12
lines changed

doc/manual/config-basic.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ Before a contest, you will want to have tested your reference
129129
solutions on the system to see whether those are judged as expected
130130
and maybe use their runtimes to set timelimits for the problems.
131131

132+
132133
The simplest way to do this is to include the jury solutions in a
133134
problem zip file and upload this. You can also upload a zip file
134135
containing just solutions to an existing problem. The zip
@@ -140,4 +141,11 @@ it need not have started yet). You can verify whether the submissions
140141
gave the expected answer in the Judging Verifier, available from
141142
the jury index page.
142143

144+
After this check change the evaluation to full in the configuration
145+
page and rejudge with a reasonable overshoot to distinguish between the
146+
slowest *Accepted* solution and the fastest *Time Limit Exceeded*.
147+
As a rule of thumb set the timelimit to twice the slowest *Accepted*
148+
solution. The Statistics/Analytics page of each problem has a graphic
149+
overview for those submissions.
150+
143151
.. _ICPC-compatible teams.tsv files: https://ccs-specs.icpc.io/2021-11/ccs_system_requirements#teamstsv

webapp/src/Controller/Jury/JuryMiscController.php

Lines changed: 18 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,7 @@ public function judgingVerifierAction(Request $request): Response
329334
'verified' => $verified,
330335
'nomatch' => $nomatch,
331336
'earlier' => $earlier,
337+
'problems' => $problems,
332338
'verifyMultiple' => $verifyMultiple,
333339
]);
334340
}

webapp/templates/jury/check_judgings.html.twig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,15 @@
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_config') }}">fully</a> judge all submissions with enough overshoot
105+
to see the maximum runtime for <code>Accepted</code> solutions and tune those against expected
106+
<code>Time Limit Exceeded</code> solutions.<br>
107+
{% for p in problems %}
108+
{% set link = path('analysis_problem', {'probid': p.probid, 'view': 'hidden'}) %}
109+
<a href="{{ link }}">{{ p | problemBadge }}</a>
110+
{% endfor %}
111+
{% endif %}
112+
102113
{% endblock %}

0 commit comments

Comments
 (0)