登入|加入我們
論壇 > 台南一中資訊社 > 題目發表
發帖|
精華 看1568|回2|收藏
樓主 Sylveon 只看他
2014-4-27 11:21:46
本文示範TOJ的投稿格式。
參考資料:By PZread

代碼:

  1. @The Structure Of Problems

  2. the structure of the .tar.xz file
  3. conf.json
  4. http/cont.html or http/cont.pdf
  5. res/testdata/[number].in
  6. res/testdata/[number].out

  7. If use Makefile
  8. res/make/Makefile
  9. res/make/[other files needed in make]

  10. Note:
  11. If cont.html exists, cont.pdf will be ignored.
  12. Pack all data into one .tar.xz file, and don’t create any top level directory, just pack conf.json, res, http into .tar.xz directly.
  13. CRLFs in testdata will be automatically converted to *nix format.
  14. Challenger need to pass all testdata to get the testcase point.
  15. The author of this document is bad at English.
  16. tar -Jcvf dest_file_name.tar.xz conf.json res http


  17. Some conf.json sample


  18. clang++ with signle testcase
  19. {
  20.         "timelimit":4000,
  21.         "memlimit":32768,
  22.         "compile":"g++",
  23.         "score":"rate",
  24.         "check":"diff",
  25.         "test":[
  26.                 {
  27.                         "data":[1],
  28.                         "weight":100
  29.                 }
  30.         ]
  31. }


  32. clang++ with two testcase, first testcase has three testdata (1.in 2.in 3.in)
  33. {
  34.         "timelimit":1000,
  35.         "memlimit":65536,
  36.         "compile":"g++",
  37.         "score":"rate",
  38.         "check":"diff",
  39.         "test":[
  40.                 {
  41.                          "data":[1,2,3],
  42.                         "weight":50
  43.                 },
  44.                 {
  45.                          "data":[4,5],
  46.                         "weight":50
  47.                 }
  48.         ]
  49. }

難疑排解 FAQ
Q1. .tar.xz格式如何製作?
A.用7-zip把檔案先封成.tar格式後再壓縮成.xz格式

[範本]
投稿題目:Hello World!
題目來源:原創題
題幹:基本IO

題目敘述:
(完整敘述須放置於檔案之/html目錄下,僅接受cont.html及cont.pdf兩種,cont.html優先使用)

跟別人打招呼是一件有禮貌的事。來向大家打招呼吧!



輸入說明:
向他打個招呼吧!名子加上 Hello ,[name] ! 後輸出。

範例輸入:
(請用code標籤)

代碼:

  1. @Peter


範例輸出:
(請用code標籤)

代碼:

  1. @Hello ,Peter !

標程:

代碼:

  1. @#include<cstdio>
  2. #include<iostream>

  3. using namespace std;

  4. int main()
  5. {
  6.         char in[25];
  7.         gets(in);
  8.         printf("Hello ,%s !\n",in);
  9.         return 0;
  10. }

測試資料下載:
(請符合正確的檔案格式)
mega網頁範本:
http://pc2.twbbs.org:81/lfs/cont.html

欲投稿題目者,只需提供題目敘述、測資、標準程式,並發文至題目發表頁面。
頭香 domen111 只看他
2014-4-27 12:42:16
這judge沒有忽略格式錯誤問題(最後沒有跳行)
Wa了3次 (還好沒有CE就不錯了)
3# allenwhale 只看他
2014-4-27 18:39:15
題目分享請先送至sylveon,allenwhale審核

竹園論壇

首頁|電腦版