Skip to content

Commands Contest

dxx114514-stack edited this page Oct 1, 2026 · 2 revisions

命令参考 · 比赛模块 contest

clijudge contest create [标题] [开始时间] [结束时间] [题目1] [题目2...] — 创建比赛

时间字符串原样存储,无格式校验,建议使用 YYYY-MM-DD HH:MM:SS。题目编号按给出顺序成为比赛内题号(1 起)。

clijudge contest create "寒假集训" "2026-01-01 10:00:00" "2026-01-01 12:00:00" 1 2
# → Contest created with ID: 1

clijudge contest delete [编号] — 删除比赛

输出 Contest 1 deleted. / Contest 1 not found.(退出码 1)

clijudge contest view [编号] — 查看比赛

比赛详情 JSON(id / title / start_time / end_time / problem_ids / created_at)。

clijudge contest list — 列出比赛

比赛对象 JSON 数组(id / title / start_time / end_time / problem_ids / created_at),与 contest view 同构,并非精简摘要。

clijudge contest problem [比赛编号] [题号] submit [文件] [--as 用户名] — 比赛内提交

立即评测并把结果(result / score / time_used / memory_used / judge_detail)写入该比赛该题的提交记录。

Submission accepted for contest 1 problem 2
  User: alice

退出码: 提交成功即 0(不看评测结果,与 problem submit 不同);比赛或题号无效为 1。

clijudge contest problem [比赛编号] [题号] view — 查看比赛题目提交

该题提交记录 JSON 数组。

clijudge contest leaderboard [比赛编号] — 比赛排名

JSON 数组,每项 { "username", "score", "accepted", "total" },按总分降序(AC 提交计入 AC 数;非 AC 也累加得分)。

clijudge contest report [比赛编号] [输出.html] — 导出比赛报告

生成含排名、题目、提交明细(含 judge_detail)的 HTML。输出路径缺省为 contest_<编号>_report.html。

输出 Contest report generated: contest_1_report.html

clijudge contest import [cdf路径] — 导入 CDF 比赛

CDF 为兼容 LemonLime 的比赛数据 JSON(题目、测试数据、提交、排行)。逐题导入本地题目库后创建比赛。

安全提示: CDF 可能携带 Special Judge / 交互器 / grader 源码(评测期以可信 / 放宽隔离模式执行),检测到时会输出 Warning: ... Only import contests from sources you trust.——请只导入可信来源的 CDF。详见 沙箱与安全。

  Imported problem: A + B Problem (ID: 1)
Contest imported: 寒假集训 (ID: 1)

clijudge contest export [比赛编号] [cdf路径] — 导出 CDF 比赛

输出 Contest exported to: contest.cdf(紧凑 JSON)。


返回 Home · 题目模块见 Commands-Problem

Clone this wiki locally