题包解析工具Package Parser
PolygonPolygon
解析 Polygon 导出 zip,打包为题目导入任务可用的结构。 Parse Polygon exports into CSGOJ problem-import ZIP layout.
| 索引Idx | 标题Title | 作者Author | 题面Stmt | 数据Data | 评测类型Judge | 哈希Hash | 语言Langs |
|---|
测例文件列表Test data files
列表按当前「评测类型」生成,与下载 ZIP 内容一致(输入/输出文件、可选 tpj.cc;通信评测含第二轮方式,多进程评测含选手进程数)。 List matches the current judge type (input/output files, optional tpj.cc; communication includes second-pass mode, multi-process includes player process count).
无测例文件(当前评测类型下)。No test files for the current judge type.
帮助Help
Polygon 导出的 zip 中,每道题目需要有如下结构: You need to prepare files with this structure for each problem:
- problem.xml
- check.cpp
- statements
- [language]
- problem-properties.json
- [picture_name].[picture_extend] (like a.png)
- [picture_name].[picture_extend] ...
- .pdf / [language] (可选,Polygon 导出的 PDF 题面)
- problem.pdf
- [language]
- tests
- [data_name] (as input)
- [data_name].a (as output,交互/通信常可省略)
- 题目解析后,可勾选并打包为 CSGOJ 支持的导入格式。 After parsing the problem, you can select and pack it into a format supported by CSGOJ.
-
评测类型下拉框与题目编辑页一致。Polygon 若标记同一程序跑两轮(
run-count=2),解析后默认「通信评测」;交互器两轮都跑、或没有.a答案时自动为「第二轮也交互」。无.a的输入仍会打成测例。多进程评测请手动选类型,并在测例弹窗填选手进程数(默认 2)。 Judge type matches the problem edit page. Polygon run-twice (run-count=2) defaults to Communication; an interactor on both runs (or tests without.a) uses interactive second-pass. Input-only tests are still packed. For multi-process, set the type and player process count (default 2) in the testdata dialog. -
若存在
statements/.pdf/<语言>/problem.pdf,「题面」列可选导入后优先使用 PDF 或 LaTeX 正文(PDF 打入导入包内TEST_* / pdf_desc,与评测数据同目录;仅use_pdf开关不同)。勾选题目后可用工具栏「正文 / PDF」组批量切换。 Ifstatements/.pdf/.../problem.pdfexists, the Statement column chooses PDF vs LaTeX; PDFs are packed underTEST_* / pdf_desc. Select rows and use the LaTeX/PDF batch group. -
插图转换基于
\includegraphics匹配,不保证全部成功,文件名需为数字、字母、下划线、减号,后跟常见图像扩展名,不支持 PDF 格式的插图,导入后注意检查。 Image conversion is based on\includegraphicsmatching and is not guaranteed to be fully successful. The file name should consist of numbers, letters, underscores, hyphens, and common image extensions. PDF format images are not supported. Please check after import.
酒井算协THUSAAC / Jiujing-style
解析清华酒井算协及 THU/CCPC 常见题包(conf.yaml + statement + data/down),打包为题目导入任务可用结构。
Parse Jiujing-style packages into CSGOJ problem-import ZIP layout.
| 索引Idx | 标题Title | 数据Data | 评测类型Judge | 哈希Hash | 语言Langs |
|---|
测例文件列表Test data files
列表按当前「评测类型」生成,与下载 ZIP 内容一致(输入/输出文件、可选 tpj.cc;通信评测含第二轮方式,多进程评测含选手进程数)。 List matches the current judge type (input/output files, optional tpj.cc; communication includes second-pass mode, multi-process includes player process count).
帮助Help
酒井算协 / THU 常见公开结构(如 CCPC 北京、THUPC 资料库):根目录或 day0/、day1/ 下每题一目录,内含 conf.yaml、statement/zh-cn.md、down/(样例)、data/(正式测例,.in / .ans)。
Typical Jiujing / THU layout: per-problem folder with conf.yaml, statement/zh-cn.md, down/ (samples), data/ (tests as .in / .ans).
- PROBLEM_DIR
- conf.yaml
- statement
- zh-cn.md (或 en.md)
- down
- 1.in / 1.ans (样例,与 conf.samples 对应)
- data
- *.in / *.ans (正式数据;打包为 .out)
- chk.cpp (可选,特判 → tpj.cc)
- resources
- 附件… (可选)
-
支持仓库根级
conf.yaml(folder: contest)与多层子目录;仅含data.cases的题目目录会被识别为题。 Contest-levelconf.yamlis ignored; only problem folders withdata.casesare listed. -
题面中的
{{ img('…') }}会转为 CSGOJ 附件路径;解析后请检查插图是否在resources/中。{{ img('…') }}macros are rewritten to attach paths; verify files underresources/.