Skip to content

Problem Structure

tobiichi3227 edited this page Oct 24, 2023 · 2 revisions

.tar.xz檔案架構

設定檔: conf.json
題序: http/cont.html or http/cont.pdf
測資輸入: res/testdata/[number].in
測資輸出: res/testdata/[number].out

如果是用Makefile,多加上以下檔案
res/make/Makefile
res/make/[其他Makefile需要的檔案]

壓縮命令

tar -Jcvf output.tar.xz conf.json res http

  1. 如果cont.html存在,cont.pdf會被忽略
  2. 測資中的CRLF會被轉換成*nix格式

conf.json 範例

g++ with two testcase

{
    "timelimit": 4000,
    "memlimit": 32768, 
    "compile": "g++",
    "score": "rate",
    "check": "diff",
    "test": [
        {
            "data": [1, 2, 3],
            "weight": 50
        },
        {
            "data": [4, 5],
            "weight": 50
        }
    ]
}

Makefile

{
    "timelimit": 4000,
    "memlimit": 32768, 
    "compile": "makefile",
    "score": "rate",
    "check": "diff",
    "test": [
        {
            "data": [1, 2, 3],
            "weight": 50
        },
        {
            "data": [4, 5],
            "weight": 50
        }
    ]
}
Clone this wiki locally