虚拟判题机对接文档

接口方法列表

抓取题目API

接口定义

http://localhost:8080/vjudge/problem/crawlProblem.action?id=${id}

输入参数
参数名类型示例值描述
idint6题目编号
返回示例
{
    "data": {
        "description": "<div class=\"panel_content\">\n  Calculate \n <i>A + B</i>. \n <br />\n</div>\n<div class=\"panel_bottom\">\n  &nbsp; \n</div>",
        "hint": "",
        "id": 1,
        "input": "<div class=\"panel_content\">\n  Each line will contain two integers \n <i>A</i> and \n <i>B</i>. Process to end of file. \n <br />\n</div>\n<div class=\"panel_bottom\">\n  &nbsp; \n</div>",
        "languageList": {
            "0": "G++",
            "1": "GCC",
            "2": "C++",
            "3": "C",
            "4": "Pascal",
            "5": "Java",
            "6": "C#"
        },
        "memoryLimit": 32768,
        "output": "<div class=\"panel_content\">\n  For each case, output \n <i>A + B</i> in one line. \n <br />\n</div>\n<div class=\"panel_bottom\">\n  &nbsp; \n</div>",
        "sampleInput": "<div class=\"panel_content\"><pre><div style=\"font-family:Courier New,Courier,monospace;\"> 1 1 </div></pre></div><div class=\"panel_bottom\">\n       &nbsp;\n      </div>",
        "sampleOutput": "<div class=\"panel_content\"><pre><div style=\"font-family:Courier New,Courier,monospace;\"> 2 </div></pre></div><div class=\"panel_bottom\">\n       &nbsp;\n      </div></div></div>",
        "source": "",
        "timeLimit": 1,
        "title": "A + B Problem"
    },
    "code": 100,
    "message": "抓取对象正在更新..."
}
返回码
codemessage备注说明
0抓取成功
100抓取对象正在更新...
200抓取对象不完整失败返回码

提交账号API

接口定义

http://localhost:8080/vjudge/user/submitAccount.action

输入参数
参数名类型示例值描述
usernameString用户名
passwordString用户密码
返回示例
{
    "code": 0,
    "message": "success"
}
返回码
codemessage备注说明
0success
200Username not exists!失败返回码

提交解答API

接口定义

http://localhost:8080/vjudge/problem/submitSolution.action

输入参数
参数名类型示例值描述
idint1题目编号
languageString2语言编号
sourceStringbase64编制代码
返回示例
{
    "data": {
        "taskId": 32
    },
    "code": 0,
    "message": "Submitting in process..."
}
返回码
codemessage备注说明
0Submitting in process...
101Please login first!
200No such a language!失败返回码

查询状态API

接口定义

http://localhost:8080/vjudge/problem/queryStatus.action?id=${id}

输入参数
参数名类型示例值描述
idint32taskId
返回示例
{
    "data": {
        "memory": 1712,
        "status": "AC",
        "time": 15
    },
    "code": 0,
    "message": "Success"
}
返回码
codemessage备注说明
0Success
200The query doesn't exist失败返回码
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值