mirror of
https://github.com/QingdaoU/oj-docs.git
synced 2024-12-29 16:01:44 +00:00
update
This commit is contained in:
parent
b4b4088dd7
commit
4eb6b21b97
@ -239,6 +239,7 @@
|
||||
<li><code>max_cpu_time</code>: unit is ms</li>
|
||||
<li><code>max_memory</code>: unit is byte</li>
|
||||
<li><code>test_case_id</code>: used to get the test_case directory</li>
|
||||
<li><code>output</code>: if this value is <code>true</code>, then user's output is returned else <code>null</code> is returned. You can use this to debug your solution</li>
|
||||
</ul>
|
||||
<h2 id="response_1">Response</h2>
|
||||
<pre><code class="js">[
|
||||
@ -315,6 +316,7 @@
|
||||
<li><code>spj_config</code>, refer to <code>client/Python/languages.py</code>, do not need to modify generally</li>
|
||||
<li><code>spj_compile_config</code>: refer to <code>client/Python/languages.py</code>, do not need to modify generally</li>
|
||||
<li><code>spj_src</code></li>
|
||||
<li><code>output</code></li>
|
||||
</ul>
|
||||
<h2 id="response_3">Response</h2>
|
||||
<pre><code class="js">[
|
||||
|
@ -97,7 +97,7 @@
|
||||
},
|
||||
{
|
||||
"location": "/JudgeServer/English/",
|
||||
"text": "JudgeServer API\n\n\nPreparement\n\n\n\n\nX-Judge-Server-Token\n HTTP header is required for all requests, the value of this header is \nsha256(token)\n.\n\n\nType of request and response data is JSON.\n\n\nRequest method is \nPOST\n.\n\n\n\n\nFor all responses, \nerr\n and \ndata\n fields will be returned. \n\n\n\n\nIf the request is processed successfully, \nerr\n field will be \nnull\n, \ndata\n field will be the data returned. \n\n\nIf error occured while processing request, \nerr\n field will be error code, \ndata\n field will be the reason.\n\n\n\n\n\n\n\n\nGet system info\n\n\n\n\nURL \n/ping\n\n\n\n\nArgs\n\n\n\n\nDo not need args\n\n\n\n\nResponse\n\n\n{\n \njudger_version\n: \n2.0.1\n,\n \nhostname\n: \nd3765528134e\n,\n // number of cpu cores, this value will determine the number of concurrent tasks\n \ncpu_core\n: 1,\n // usage of cpu and memory\n \ncpu\n: 4.1,\n \nmemory\n: 24.5,\n \naction\n: \npong\n\n}\n\n\n\n\nJudge (not for Special Judge)\n\n\n\n\nURL \n/judge\n\n\n\n\nArgs\n\n\n\n\nsrc\n: source code\n\n\nlanguage_config\n: refer to \nclient/Python/languages.py\n, do not need to modify generally\n\n\nmax_cpu_time\n: unit is ms\n\n\nmax_memory\n: unit is byte\n\n\ntest_case_id\n: used to get the test_case directory\n\n\n\n\nResponse\n\n\n[\n // each object/dict is a test case file running result\n {\n \ncpu_time\n: 1,\n // refer to the end of this document\n \nresult\n: 0,\n \nmemory\n: 12836864,\n \nreal_time\n: 2,\n \nsignal\n: 0,\n \nerror\n: 0,\n // refer to the end of this document\n \nexit_code\n: 0,\n \noutput_md5\n: \neccbc87e4b5ce2fe28308fd9f2a7baf3\n,\n // test case file id\n \ntest_case\n: 1\n },\n {\n \ncpu_time\n: 1,\n \nresult\n: 0,\n \nmemory\n: 12849152,\n \nreal_time\n: 1,\n \nsignal\n: 0,\n \nerror\n: 0,\n \nexit_code\n: 0,\n \noutput_md5\n: \neccbc87e4b5ce2fe28308fd9f2a7baf3\n,\n \ntest_case\n: 2\n }\n]\n\n\n\n\nWhen compilation is failed, following data will be returned\n\n\n{\n \nerr\n: \nCompileError\n, \n \ndata\n: \nerror resson\n\n}\n\n\n\n\nCompile Special Judge\n\n\n\n\nURL \n/compile_spj\n\n\n\n\nArgs\n\n\n\n\nsrc\n: special judge soure code\n\n\nspj_version\n: version of special judge, used to determine whether to recompile special judge\n\n\nspj_compile_config\n: refer to \nclient/Python/languages.py\n, do not need to modify generally\n\n\ntest_case_id\n\n\n\n\nResponse\n\n\nsuccess\n\n\n\n\n\nWhen compilation is failed, following data will be returned\n\n\n{\n \nerr\n: \nSPJCompileError\n, \n \ndata\n: \nerror resson\n\n}\n\n\n\n\nJudge (for Special Judge)\n\n\n\n\nURL \n/judge\n\n\n\n\nArgs\n\n\n\n\nsrc\n\n\nlanguage_config\n\n\nmax_cpu_time\n\n\nmax_memory\n\n\ntest_case_id\n\n\nspj_version\n\n\nspj_config\n, refer to \nclient/Python/languages.py\n, do not need to modify generally\n\n\nspj_compile_config\n: refer to \nclient/Python/languages.py\n, do not need to modify generally\n\n\nspj_src\n\n\n\n\nResponse\n\n\n[\n {\n \ncpu_time\n: 1,\n \nresult\n: 0,\n \nmemory\n: 12836864,\n \nreal_time\n: 2,\n \nsignal\n: 0,\n \nerror\n: 0,\n \nexit_code\n: 0,\n \noutput_md5\n: null,\n \ntest_case\n: 1\n },\n {\n \ncpu_time\n: 1,\n \nresult\n: 0,\n \nmemory\n: 12849152,\n \nreal_time\n: 1,\n \nsignal\n: 0,\n \nerror\n: 0,\n \nexit_code\n: 0,\n \noutput_md5\n: null,\n \ntest_case\n: 2\n }\n]\n\n\n\n\nWhen compilation is failed, following data will be returned\n\n\n{\n \nerr\n: \nCompileError\n, \n \ndata\n: \nerror reason\n\n}\n\n\n\n\nIf SPJ process crashed, \nresult = SYSTEM_ERROR\n and \nERROR = SPJ_ERROR\n is returned.\n\n\nresult\n field return value\n\n\n\n\nWRONG_ANSWER = -1 (this means the process exited normally, but the answer is wrong)\n\n\nSUCCESS = 0 (this means the answer is accepted)\n\n\nCPU_TIME_LIMIT_EXCEEDED = 1 \n\n\nREAL_TIME_LIMIT_EXCEEDED = 2\n\n\nMEMORY_LIMIT_EXCEEDED = 3\n\n\nRUNTIME_ERROR = 4\n\n\nSYSTEM_ERROR = 5\n\n\n\n\nerror\n field return value\n\n\n\n\nSUCCESS = 0\n\n\nINVALID_CONFIG = -1\n\n\nCLONE_FAILED = -2\n\n\nPTHREAD_FAILED = -3\n\n\nWAIT_FAILED = -4\n\n\nROOT_REQUIRED = -5\n\n\nLOAD_SECCOMP_FAILED = -6\n\n\nSETRLIMIT_FAILED = -7\n\n\nDUP2_FAILED = -8\n\n\nSETUID_FAILED = -9\n\n\nEXECVE_FAILED = -10\n\n\nSPJ_ERROR = -11",
|
||||
"text": "JudgeServer API\n\n\nPreparement\n\n\n\n\nX-Judge-Server-Token\n HTTP header is required for all requests, the value of this header is \nsha256(token)\n.\n\n\nType of request and response data is JSON.\n\n\nRequest method is \nPOST\n.\n\n\n\n\nFor all responses, \nerr\n and \ndata\n fields will be returned. \n\n\n\n\nIf the request is processed successfully, \nerr\n field will be \nnull\n, \ndata\n field will be the data returned. \n\n\nIf error occured while processing request, \nerr\n field will be error code, \ndata\n field will be the reason.\n\n\n\n\n\n\n\n\nGet system info\n\n\n\n\nURL \n/ping\n\n\n\n\nArgs\n\n\n\n\nDo not need args\n\n\n\n\nResponse\n\n\n{\n \njudger_version\n: \n2.0.1\n,\n \nhostname\n: \nd3765528134e\n,\n // number of cpu cores, this value will determine the number of concurrent tasks\n \ncpu_core\n: 1,\n // usage of cpu and memory\n \ncpu\n: 4.1,\n \nmemory\n: 24.5,\n \naction\n: \npong\n\n}\n\n\n\n\nJudge (not for Special Judge)\n\n\n\n\nURL \n/judge\n\n\n\n\nArgs\n\n\n\n\nsrc\n: source code\n\n\nlanguage_config\n: refer to \nclient/Python/languages.py\n, do not need to modify generally\n\n\nmax_cpu_time\n: unit is ms\n\n\nmax_memory\n: unit is byte\n\n\ntest_case_id\n: used to get the test_case directory\n\n\noutput\n: if this value is \ntrue\n, then user's output is returned else \nnull\n is returned. You can use this to debug your solution\n\n\n\n\nResponse\n\n\n[\n // each object/dict is a test case file running result\n {\n \ncpu_time\n: 1,\n // refer to the end of this document\n \nresult\n: 0,\n \nmemory\n: 12836864,\n \nreal_time\n: 2,\n \nsignal\n: 0,\n \nerror\n: 0,\n // refer to the end of this document\n \nexit_code\n: 0,\n \noutput_md5\n: \neccbc87e4b5ce2fe28308fd9f2a7baf3\n,\n // test case file id\n \ntest_case\n: 1\n },\n {\n \ncpu_time\n: 1,\n \nresult\n: 0,\n \nmemory\n: 12849152,\n \nreal_time\n: 1,\n \nsignal\n: 0,\n \nerror\n: 0,\n \nexit_code\n: 0,\n \noutput_md5\n: \neccbc87e4b5ce2fe28308fd9f2a7baf3\n,\n \ntest_case\n: 2\n }\n]\n\n\n\n\nWhen compilation is failed, following data will be returned\n\n\n{\n \nerr\n: \nCompileError\n, \n \ndata\n: \nerror resson\n\n}\n\n\n\n\nCompile Special Judge\n\n\n\n\nURL \n/compile_spj\n\n\n\n\nArgs\n\n\n\n\nsrc\n: special judge soure code\n\n\nspj_version\n: version of special judge, used to determine whether to recompile special judge\n\n\nspj_compile_config\n: refer to \nclient/Python/languages.py\n, do not need to modify generally\n\n\ntest_case_id\n\n\n\n\nResponse\n\n\nsuccess\n\n\n\n\n\nWhen compilation is failed, following data will be returned\n\n\n{\n \nerr\n: \nSPJCompileError\n, \n \ndata\n: \nerror resson\n\n}\n\n\n\n\nJudge (for Special Judge)\n\n\n\n\nURL \n/judge\n\n\n\n\nArgs\n\n\n\n\nsrc\n\n\nlanguage_config\n\n\nmax_cpu_time\n\n\nmax_memory\n\n\ntest_case_id\n\n\nspj_version\n\n\nspj_config\n, refer to \nclient/Python/languages.py\n, do not need to modify generally\n\n\nspj_compile_config\n: refer to \nclient/Python/languages.py\n, do not need to modify generally\n\n\nspj_src\n\n\noutput\n\n\n\n\nResponse\n\n\n[\n {\n \ncpu_time\n: 1,\n \nresult\n: 0,\n \nmemory\n: 12836864,\n \nreal_time\n: 2,\n \nsignal\n: 0,\n \nerror\n: 0,\n \nexit_code\n: 0,\n \noutput_md5\n: null,\n \ntest_case\n: 1\n },\n {\n \ncpu_time\n: 1,\n \nresult\n: 0,\n \nmemory\n: 12849152,\n \nreal_time\n: 1,\n \nsignal\n: 0,\n \nerror\n: 0,\n \nexit_code\n: 0,\n \noutput_md5\n: null,\n \ntest_case\n: 2\n }\n]\n\n\n\n\nWhen compilation is failed, following data will be returned\n\n\n{\n \nerr\n: \nCompileError\n, \n \ndata\n: \nerror reason\n\n}\n\n\n\n\nIf SPJ process crashed, \nresult = SYSTEM_ERROR\n and \nERROR = SPJ_ERROR\n is returned.\n\n\nresult\n field return value\n\n\n\n\nWRONG_ANSWER = -1 (this means the process exited normally, but the answer is wrong)\n\n\nSUCCESS = 0 (this means the answer is accepted)\n\n\nCPU_TIME_LIMIT_EXCEEDED = 1 \n\n\nREAL_TIME_LIMIT_EXCEEDED = 2\n\n\nMEMORY_LIMIT_EXCEEDED = 3\n\n\nRUNTIME_ERROR = 4\n\n\nSYSTEM_ERROR = 5\n\n\n\n\nerror\n field return value\n\n\n\n\nSUCCESS = 0\n\n\nINVALID_CONFIG = -1\n\n\nCLONE_FAILED = -2\n\n\nPTHREAD_FAILED = -3\n\n\nWAIT_FAILED = -4\n\n\nROOT_REQUIRED = -5\n\n\nLOAD_SECCOMP_FAILED = -6\n\n\nSETRLIMIT_FAILED = -7\n\n\nDUP2_FAILED = -8\n\n\nSETUID_FAILED = -9\n\n\nEXECVE_FAILED = -10\n\n\nSPJ_ERROR = -11",
|
||||
"title": "API"
|
||||
},
|
||||
{
|
||||
@ -132,7 +132,7 @@
|
||||
},
|
||||
{
|
||||
"location": "/JudgeServer/English/#args_1",
|
||||
"text": "src : source code language_config : refer to client/Python/languages.py , do not need to modify generally max_cpu_time : unit is ms max_memory : unit is byte test_case_id : used to get the test_case directory",
|
||||
"text": "src : source code language_config : refer to client/Python/languages.py , do not need to modify generally max_cpu_time : unit is ms max_memory : unit is byte test_case_id : used to get the test_case directory output : if this value is true , then user's output is returned else null is returned. You can use this to debug your solution",
|
||||
"title": "Args"
|
||||
},
|
||||
{
|
||||
@ -162,7 +162,7 @@
|
||||
},
|
||||
{
|
||||
"location": "/JudgeServer/English/#args_3",
|
||||
"text": "src language_config max_cpu_time max_memory test_case_id spj_version spj_config , refer to client/Python/languages.py , do not need to modify generally spj_compile_config : refer to client/Python/languages.py , do not need to modify generally spj_src",
|
||||
"text": "src language_config max_cpu_time max_memory test_case_id spj_version spj_config , refer to client/Python/languages.py , do not need to modify generally spj_compile_config : refer to client/Python/languages.py , do not need to modify generally spj_src output",
|
||||
"title": "Args"
|
||||
},
|
||||
{
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<url>
|
||||
<loc>None/</loc>
|
||||
<lastmod>2016-10-10</lastmod>
|
||||
<lastmod>2016-10-13</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
|
||||
<url>
|
||||
<loc>None/Judger/</loc>
|
||||
<lastmod>2016-10-10</lastmod>
|
||||
<lastmod>2016-10-13</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
|
||||
<url>
|
||||
<loc>None/JudgeServer/</loc>
|
||||
<lastmod>2016-10-10</lastmod>
|
||||
<lastmod>2016-10-13</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
|
@ -44,6 +44,7 @@
|
||||
- `max_cpu_time`: unit is ms
|
||||
- `max_memory`: unit is byte
|
||||
- `test_case_id`: used to get the test_case directory
|
||||
- `output`: if this value is `true`, then user's output is returned else `null` is returned. You can use this to debug your solution
|
||||
|
||||
## Response
|
||||
|
||||
@ -128,6 +129,7 @@ When compilation is failed, following data will be returned
|
||||
- `spj_config`, refer to `client/Python/languages.py`, do not need to modify generally
|
||||
- `spj_compile_config`: refer to `client/Python/languages.py`, do not need to modify generally
|
||||
- `spj_src`
|
||||
- `output`
|
||||
|
||||
## Response
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user