「TOJ」:修訂間差異
跳至導覽
跳至搜尋
Tobiichi3227(留言 | 貢獻) 無編輯摘要 |
|||
(未顯示由 1 位使用者於中間所作的 3 次修訂) | |||
行 6: | 行 6: | ||
* 由[[T13]]的[[吳哲宇]]([[pzread]])開發 |
* 由[[T13]]的[[吳哲宇]]([[pzread]])開發 |
||
* [[T19]]的[[lys0829]]於2017年將judge更新 |
* [[T19]]的[[lys0829]]於2017年將judge更新 |
||
* [[T24]]的[[tobiichi3227]]與[[ccccchhhheeenng]]於2022年將後端Server的軟硬體更新 |
|||
== Special Judge == |
== Special Judge == |
||
將[https://github.com/TFcis/Problem-setting-tools/blob/master/TOJ-problem-example/conf.json conf.json]中的check從diff改成ioredir,及設定metadata如下。 |
將[https://github.com/TFcis/Problem-setting-tools/blob/master/TOJ-problem-example/conf.json conf.json]中的check從diff改成ioredir,及設定metadata如下。 |
||
;/conf.json |
|||
<syntaxhighlight lang="JSON">{ |
<syntaxhighlight lang="JSON">{ |
||
"check": "ioredir", |
|||
"metadata": { |
"metadata": { |
||
"redir_test": { |
"redir_test": { |
||
行 25: | 行 28: | ||
} |
} |
||
}</syntaxhighlight> |
}</syntaxhighlight> |
||
;/res/check/check.cpp |
|||
分別從答案及輸出分別讀入long double。 |
|||
<syntaxhighlight lang="C++"> |
|||
long double Answer, Output; |
|||
FILE *ansf = fdopen(2, "r"); |
|||
scanf("%Lf", &Output); |
|||
fscanf(ansf, "%Lf", &Answer); |
|||
</syntaxhighlight> |
|||
;/res/check/build |
|||
<syntaxhighlight lang="Bash"> |
|||
#!/bin/sh |
|||
g++ -o check check.cpp |
|||
</syntaxhighlight> |
|||
參考 https://hackmd.io/s/BkHdt57I |
參考 https://hackmd.io/s/BkHdt57I |
||
行 30: | 行 49: | ||
== 參見 == |
== 參見 == |
||
* [[TOJ API]]:API文檔 |
* [[TOJ API]]:API文檔 |
||
* [https://github.com/pzread/judge judge原始碼] |
於 2022年11月3日 (四) 21:08 的修訂
- 社團練習用的Online Judge
- 由T13的吳哲宇(pzread)開發
- T19的lys0829於2017年將judge更新
- T24的tobiichi3227與ccccchhhheeenng於2022年將後端Server的軟硬體更新
Special Judge
將conf.json中的check從diff改成ioredir,及設定metadata如下。
- /conf.json
{
"check": "ioredir",
"metadata": {
"redir_test": {
"pipeout": 1,
"testin": 0,
"testout": -1,
"pipein": -1
},
"redir_check": {
"ansin": 2,
"testin": -1,
"pipeout": 0,
"pipein": -1
}
}
}
- /res/check/check.cpp
分別從答案及輸出分別讀入long double。
long double Answer, Output;
FILE *ansf = fdopen(2, "r");
scanf("%Lf", &Output);
fscanf(ansf, "%Lf", &Answer);
- /res/check/build
#!/bin/sh
g++ -o check check.cpp
參考 https://hackmd.io/s/BkHdt57I