From 96627e4b6f29d18dacd2cdd9887febad54167e98 Mon Sep 17 00:00:00 2001 From: zjz1993 <1429595365@qq.com> Date: Thu, 15 Aug 2019 16:36:08 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20=E4=BF=AE=E5=A4=8D=E4=B8=8D=E8=AE=A9?= =?UTF-8?q?=E6=89=80=E6=9C=89=E4=BA=BA=E6=9F=A5=E7=9C=8B=E6=AF=94=E8=B5=9B?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=BB=86=E8=8A=82=E7=9A=84bug=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9B=A0=E4=B8=BA=E6=AF=94=E8=B5=9B=E5=88=86?= =?UTF-8?q?=E5=80=BC=E6=94=B9=E5=8F=98=E5=AF=BC=E8=87=B4=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E5=81=8F=E5=B7=AE=E7=9A=84bug=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/contest.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/contest.js b/modules/contest.js index e8fa4f4..ae9c689 100644 --- a/modules/contest.js +++ b/modules/contest.js @@ -207,7 +207,7 @@ app.get('/contest/:id', async (req, res) => { for (let player of players) { if (player.score_details[problem.problem.id]) { problem.statistics.attempt++; - if ((contest.type === 'acm' && player.score_details[problem.problem.id].accepted) || ((contest.type === 'noi' || contest.type === 'ioi') && player.score_details[problem.problem.id].score === 100)) { + if ((contest.type === 'acm' && player.score_details[problem.problem.id].accepted) || ((contest.type === 'noi' || contest.type === 'ioi') && player.score_details[problem.problem.id].score >= 100)) { problem.statistics.accepted++; } @@ -458,12 +458,12 @@ app.get('/contest/submission/:id', async (req, res) => { judge.problem_id = problems_id.indexOf(judge.problem_id) + 1; judge.problem.title = syzoj.utils.removeTitleTag(judge.problem.title); displayConfig.showUsage = true; + displayConfig.showResult=true; displayConfig.showDetailResult=true; if (judge.problem.type !== 'submit-answer') { judge.codeLength = Buffer.from(judge.code).length; judge.code = await syzoj.utils.highlight(judge.code, syzoj.languages[judge.language].highlight); } - res.render('submission_contest', { contest_id: contest.id, info: getSubmissionInfo(judge, displayConfig),