项目 / 计划:tuack-ng

· · 科技·工程

本文档将不定期重投,以反映项目的最新更变。

可能更新不及时,可以在 https://pulsar33550336.github.io/2025/12/10/%E9%A1%B9%E7%9B%AE-%E8%AE%A1%E5%88%92%EF%BC%9Atuack-ng/ 找到最新的版本。

概述

tuack-ng 项目是重构后的 tuack 项目,旨在提供更加高效和轻量的出题体验。

项目地址:https://github.com/Pulsar33550336/tuack-ng

目前进度效果展示

图中渲染的是 CSPS 2024 试题。

进度 / 计划

正在进行 / 即将开始的子项目

  1. 整个模块的配置文件等数据结构的定义;项目基础(长期)
  1. 渲染(render 子模块)
  1. 测试(test 子模块)

未开始的子项目

  1. 导入导出(import & dump
  1. 小工具(tools

里程碑

0.1.0(已完成)

部分技术细节

  1. 目标语言:Rust。
  2. 目标渲染框架:typst。
  3. 格式转换库:魔改后的 markdown-ppp 项目,已经开源 https://github.com/Pulsar33550336/markdown-ppp。

致谢

感谢 MrPython 的 CNOI tuack 模板。

开源协议

由于采用了 CNOI 中的内容,与 MIT 协议开源的 markdown-ppp 项目,综合下来,使用了 AGPL 3.0 协议。

附录

顺手写一下目前工程文件夹的计划吧,备忘:

注意,这个东西可能不准。

结构:比赛->比赛日->赛题

比赛配置文件:

{
 "version": 3,
 "folder" : "contest",
 "name" : "试题名称",
 "subdir" : [
    "子试题1",
    "子试题2",
 ],
 "title" : {
  "zh-cn" : "标题"
 },
 "short title" : {
  "zh-cn" : "副标题"
 }
}

比赛日配置文件:

{
 "version": 3,
 "folder" : "day",
 "name" : "比赛日名称",
 "subdir" : [
    "试题1",
    "试题2"
 ],
 "title" : {
  "zh-cn" : "场次"
 },
 "compile" : {
  "cpp" : "-O2 -std=c++14",
  "c" : "-O2 -std=c11",
 },
 "start time" : [2024,10,26,14,30,0],
 "end time" : [2024,10,26,14,30,0]
}

试题配置文件:

{
 "version": 3,
 "folder" : "problem",
 "type" : "program/output/interactive",
 "name" : "赛题名称",
 "title" : {
  "zh-cn" : "用于试题标题的中文名称"
 },
 "time limit" : 1.0,
 "memory limit" : "512 MiB",
 "partial score" : false,

 "samples" : [
   {
      "id" : 1,
      "input" : "a.in", // 留空默认找 {id}.in
      "output" : "a.ans" // 留空默认找 {id}.ans
   },
   {
      "id" : 2,
      "input" : "b.in", // 留空默认找 {id}.in
      "output" : "b.ans" // 留空默认找 {id}.ans
   }
 ],
//  "args" : {
//   "n" : 1000
//  },
 "data" : [
   {
      "id" : 1,
      "score": 50, // 是否等分会实时计算
      "input" : "a.in", // 留空默认找 {id}.in
      "output" : "a.ans" // 留空默认找 {id}.ans
   },
   {
      "id" : 2,
      "score": 50,
      "input" : "b.in", // 留空默认找 {id}.in
      "output" : "b.ans" // 留空默认找 {id}.ans
   }
 ],
//  "pretest" : [],
//  "tests" : {}
}

试题目录结构: