Skip to content
This repository was archived by the owner on Feb 5, 2024. It is now read-only.

Submissions

gedorinku edited this page Apr 15, 2018 · 5 revisions

目次

ジャッジのステータス

ステータス(のID) 説明
0 In Queue
1 Judging
2 Accepted
3 Presentation Error
4 Wrong Answer
5 Time Limit Exceeded
6 Memory Limit Exceeded
7 Runtime Error
8 Compile Error
9 Output Limit Exceeded 解答の出力が制限を超えた
10 Unknown Error ジャッジ中にエラーが発生した(バグか環境構築のミス)

🔒解答の提出

リクエスト

POST /problems/:id/submissions
Content-Type: application/json
{
  "languageID": 1,
  "sourceCode": "int main() {}"
}

レスポンス

201 Created
Content-Type: application/json
{
  "id": 9,
  "createdAt": "2018-01-14T13:18:36.824673+09:00",
  "updatedAt": "2018-01-14T13:18:36.824673+09:00",
  "userID": 1,
  "user": {
    "name": "admin",
    "displayName": "admin",
    "authority": 1
  },
  "problemID": 2,
  "problem": {
    "id": 2,
    "writerID": 1,
    "Writer": {
      "name": "admin",
      "displayName": "admin",
      "authority": 1
    },
    "createdAt": "2018-01-12T22:24:29+09:00",
    "updatedAt": "2018-01-12T22:24:29+09:00",
    "title": "タイトル",
    "body": "問題文",
    "inputFormat": "入力形式",
    "outputFormat": "出力形式",
    "constraints": "制約",
    "Samples": [
      {
        "ID": 1,
        "ProblemID": 2,
        "Input": "入力例",
        "Output": "出力例",
        "Description": ""
      }
    ],
    "timeLimit": 1000000000,
    "memoryLimit": 256,
    "judgeType": 0,
    "JudgeSourceCode": "",
    "CaseSets": [
      {
        "id": 9,
        "createdAt": "2018-01-14T12:20:12+09:00",
        "updatedAt": "2018-01-14T12:20:12+09:00",
        "problemID": 2,
        "point": 0
      }
    ],
    "Contest": null,
    "contestID": 0
  },
  "languageID": 1,
  "language": {
    "displayName": "C++17 (GCC 7.2.0)",
    "compileCommand": "g++ -w -lm -std=gnu++17 -O2 -o main.o main.cpp",
    "execCommand": "./main.o"
  },
  "sourceCode": "int main() {}",
  "point": 0,
  "status": 0,
  "errorLog": "",
  "execTime": 0,
  "memoryUsage": 0,
  "codeBytes": 13,
  "judgeSetResults": [
    {
      "id": 17,
      "createdAt": "2018-01-14T13:18:37+09:00",
      "updatedAt": "2018-01-14T13:18:37+09:00",
      "caseSetID": 9,
      "point": 0,
      "Status": 0,
      "judgeResults": [
        {
          "ID": 33,
          "CreatedAt": "2018-01-14T13:18:37+09:00",
          "UpdatedAt": "2018-01-14T13:18:37+09:00",
          "JudgeSetResultID": 17,
          "TestCaseID": 17,
          "Status": 0,
          "ExecTime": 0,
          "MemoryUsage": 0
        }
      ],
      "execTime": 0,
      "memoryUsage": 0
    }
  ]
}

(🔒)提出一覧を取得

コンテストの問題の提出を取得するときは、認証が必要。

リクエスト

GET /problems/:id/submissions

クエリパラメーター

  • minID: デフォルトは0。idがminID <= idであるような問題を取得する
  • maxID: idが id <= maxIDであるような問題を取得する。0にすると無視される。デフォルトは0。
  • count: 最大でcount個の問題を取得する。0にすると無制限。デフォルトは0。

レスポンス

200 OK
Content-Type: application/json
[
  {
    "id": 9,
    "createdAt": "2018-01-14T13:18:36.824673+09:00",
    "updatedAt": "2018-01-14T13:18:36.824673+09:00",
    "userID": 1,
    "user": {
      "name": "admin",
      "displayName": "admin",
      "authority": 1
    },
    "problemID": 2,
    "problem": {
      "id": 2,
      "writerID": 1,
      "Writer": {
        "name": "admin",
        "displayName": "admin",
        "authority": 1
      },
      "createdAt": "2018-01-12T22:24:29+09:00",
      "updatedAt": "2018-01-12T22:24:29+09:00",
      "title": "タイトル",
      "body": "問題文",
      "inputFormat": "入力形式",
      "outputFormat": "出力形式",
      "constraints": "制約",
      "Samples": [
        {
          "ID": 1,
          "ProblemID": 2,
          "Input": "入力例",
          "Output": "出力例",
          "Description": ""
        }
      ],
      "timeLimit": 1000000000,
      "memoryLimit": 256,
      "judgeType": 0,
      "JudgeSourceCode": "",
      "CaseSets": [
        {
          "id": 9,
          "createdAt": "2018-01-14T12:20:12+09:00",
          "updatedAt": "2018-01-14T12:20:12+09:00",
          "problemID": 2,
          "point": 0
        }
      ],
      "Contest": null,
      "contestID": 0
    },
    "language": {
      "displayName": "C++17 (GCC 7.2.0)",
      "compileCommand": "g++ -w -lm -std=gnu++17 -O2 -o main.o main.cpp",
      "execCommand": "./main.o"
    },
    "sourceCode": "int main() {}",
    "point": 0,
    "status": 0,
    "errorLog": "",
    "execTime": 0,
    "memoryUsage": 0,
    "codeBytes": 13,
    "judgeSetResults": [
      {
        "id": 17,
        "createdAt": "2018-01-14T13:18:37+09:00",
        "updatedAt": "2018-01-14T13:18:37+09:00",
        "caseSetID": 9,
        "point": 0,
        "Status": 0,
        "judgeResults": [
          {
            "ID": 33,
            "CreatedAt": "2018-01-14T13:18:37+09:00",
            "UpdatedAt": "2018-01-14T13:18:37+09:00",
            "JudgeSetResultID": 17,
            "TestCaseID": 17,
            "Status": 0,
            "ExecTime": 0,
            "MemoryUsage": 0
          }
        ],
        "execTime": 0,
        "memoryUsage": 0
      }
    ]
  }
]

🔒リジャッジ

提出をリジャッジする。

リクエスト

POST /submissions/:id/rejudge

レスポンス

204 No Content