Polygen作为Codeforces的题目管理平台,其实在各种比赛的出题工作中都有着广泛的应用。
该平台能维护题目和比赛,并直接导入到Codeforces,如果有自己架设的OJ,同样也能在生成题面/数据、做一些规范检查等方面对出题有所帮助。
关于题目
网上有这方面的大概资料,参考这篇文章即可 codeforces的polygon平台使用指北 。
关于比赛
先平台上新建比赛,将需要的题目和出题人拉入比赛,就可以开始制作一场比赛了。
接下来主要介绍一下如何生成题面,Polygen自带一个$Preview Statements as PDF$(预览pdf格式的题面的功能)。
主要是用平台自带的$Latex$模版来生成一套完整的比赛题面。
带有中文的题面会显示乱码或者出错,为了使它支持中文,我们需要将比赛中所有题目的$files$里的$problem.tex$文件替换成如下代码:
egin{problem}{${problem.name}}<#--
-->{<#if "stdin" == problem.inputFile><#--
--><#if "russian" == language>стандартный ввод<#--
--><#else>standard input<#--
--></#if><#else>${problem.inputFile}</#if>}<#--
-->{<#if "stdout" == problem.outputFile><#--
--><#if "russian" == language>стандартный вывод<#--
--><#else>standard output<#--
--></#if><#else>${problem.outputFile}</#if>}<#--
--><#assign timeLimit=problem.timeLimit/1000/><#--
--><#if language="russian"><#--
--><#if problem.timeLimit%1000!=0||(10<=timeLimit%100&&timeLimit%100<20)||timeLimit%10=0||5<=timeLimit><#--
-->{${timeLimit?c} секунд}<#--
--><#else><#--
--><#if timeLimit%10=1><#--
-->{${timeLimit?c} секунда}<#--
--><#else><#--
-->{${timeLimit?c} секунды}<#--
--></#if><#--
--></#if><#--
--><#else><#--
-->{${timeLimit?c} second<#if (timeLimit!=1)>s</#if>}<#--
--></#if><#--
--><#assign memoryLimit=problem.memoryLimit/1048576/><#--
--><#if language="russian"><#--
--><#if problem.memoryLimit%1048576==0&&!(10<=memoryLimit%100&&memoryLimit%100<20)&&2<=memoryLimit%10&&memoryLimit%10<5><#--
-->{${memoryLimit?c} мегабайта}
<#else><#--
-->{${memoryLimit?c} мегабайт}
</#if>
<#else><#--
-->{${memoryLimit?c} megabyte<#if (memoryLimit>1)>s</#if>}
</#if>
<#if providedStatementsCommands?? && providedStatementsCommands?size != 0><#--
--><#list providedStatementsCommands as command><#--
-->${command?string}
</#list>
</#if>
${problem.legend}
<#if problem.input?? && (problem.input?length>0)>
InputFile
${problem.input}
</#if>
<#if problem.output?? && (problem.output?length>0)>
OutputFile
${problem.output}
</#if>
<#if problem.interaction?? && (problem.interaction?length>0)>
Interaction
${problem.interaction}
</#if>
<#if problem.scoring?? && (problem.scoring?length>0)>
Scoring
${problem.scoring}
</#if>
<#if (problem.sampleTests?size>0)>
Example<#if (problem.sampleTests?size>1)>s</#if>
begin{example}
<#list problem.sampleTests as test>
exmpfile{${test.inputFile}}{${test.outputFile}}%
</#list>
end{example}
</#if>
<#if (problem.notes??) && (problem.notes?length > 0)>
Note
${problem.notes}
</#if>
end{problem}
接下来比赛还需要一个封面,这个可以直接修改$constest$的$Properties/Files$中的$statements.ftl$文件。
比如我们可以简单地在$egin{document}$之后加入如下代码来增加一个封面。
itle{Hugetextbf{{{ The Test Contest }}}}
date{}
author {Test University }
maketitle
includegraphics[width=7in]{statements-logo.png}
这里的封面有比赛名,作者,logo。
值得注意的是如果需要导入图片需要在$Properties/Files$中上传(题目中的图片同理)。
总的来说,主要还是用$Latex$模版来生成题面,需要做一些修改就学着去改$Latex$即可。
最后的效果如图:

如果需要对封面再进行一些设计,我推荐直接使用$Photoshop$进行编辑。
比如这样:
