|
|
@ -207,7 +207,7 @@ app.get('/contest/:id', async (req, res) => { |
|
|
|
for (let player of players) { |
|
|
|
for (let player of players) { |
|
|
|
if (player.score_details[problem.problem.id]) { |
|
|
|
if (player.score_details[problem.problem.id]) { |
|
|
|
problem.statistics.attempt++; |
|
|
|
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++; |
|
|
|
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_id = problems_id.indexOf(judge.problem_id) + 1; |
|
|
|
judge.problem.title = syzoj.utils.removeTitleTag(judge.problem.title); |
|
|
|
judge.problem.title = syzoj.utils.removeTitleTag(judge.problem.title); |
|
|
|
displayConfig.showUsage = true; |
|
|
|
displayConfig.showUsage = true; |
|
|
|
|
|
|
|
displayConfig.showResult=true; |
|
|
|
displayConfig.showDetailResult=true; |
|
|
|
displayConfig.showDetailResult=true; |
|
|
|
if (judge.problem.type !== 'submit-answer') { |
|
|
|
if (judge.problem.type !== 'submit-answer') { |
|
|
|
judge.codeLength = Buffer.from(judge.code).length; |
|
|
|
judge.codeLength = Buffer.from(judge.code).length; |
|
|
|
judge.code = await syzoj.utils.highlight(judge.code, syzoj.languages[judge.language].highlight); |
|
|
|
judge.code = await syzoj.utils.highlight(judge.code, syzoj.languages[judge.language].highlight); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
res.render('submission_contest', { |
|
|
|
res.render('submission_contest', { |
|
|
|
contest_id: contest.id, |
|
|
|
contest_id: contest.id, |
|
|
|
info: getSubmissionInfo(judge, displayConfig), |
|
|
|
info: getSubmissionInfo(judge, displayConfig), |
|
|
|