-
Notifications
You must be signed in to change notification settings - Fork 209
/
contest_problem.proto
139 lines (122 loc) · 4.11 KB
/
contest_problem.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
// Copyright 2022 DeepMind Technologies Limited
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto2";
package deepmind.code_contests;
import "google/protobuf/duration.proto";
message ContestProblem {
reserved 3, 9, 11, 16, 17, 22, 23, 24, 25, 26, 27, 28;
// The name of the contest. Note that names could agree between different
// sources.
optional string name = 1;
// A natural language description of a programming problem.
optional string description = 2;
// A paired input and output that can be used to test potential solutions.
message Test {
reserved 3, 4;
optional string input = 1;
optional string output = 2;
}
// Public tests are those that are available before submitting a solution,
// typically as part of the description itself. They are therefore acceptable
// inputs to a model.
repeated Test public_tests = 4;
// Private tests are not visible before submitting a solution, so should not
// be made available as inputs to a model.
repeated Test private_tests = 5;
// Generated tests are automatically generated by modifying inputs from public
// and private tests and validating using known correct solutions.
repeated Test generated_tests = 18;
enum Source {
reserved 5, 8, 9, 10, 11;
UNKNOWN_SOURCE = 0;
CODECHEF = 1;
CODEFORCES = 2;
HACKEREARTH = 3;
CODEJAM = 4;
ATCODER = 6;
AIZU = 7;
}
// The original source of the problem.
optional Source source = 6;
// A representation of the difficulty of the problem. Note that different
// sources use different, non-comparable gradings. For Codeforces problems,
// cf_rating is a more reliable measure of difficulty when available.
enum Difficulty {
UNKNOWN_DIFFICULTY = 0;
EASY = 1;
MEDIUM = 2;
HARD = 3;
HARDER = 4;
HARDEST = 5;
EXTERNAL = 6;
A = 7;
B = 8;
C = 9;
D = 10;
E = 11;
F = 12;
G = 13;
H = 14;
I = 15;
J = 16;
K = 17;
L = 19;
M = 20;
N = 21;
O = 22;
P = 23;
Q = 24;
R = 25;
S = 26;
T = 27;
U = 28;
V = 29;
}
optional Difficulty difficulty = 7;
message Solution {
reserved 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14;
enum Language {
reserved 5, 6, 7, 8, 9, 10, 11, 12, 13;
UNKNOWN_LANGUAGE = 0;
PYTHON = 1; // Python2
CPP = 2;
PYTHON3 = 3;
JAVA = 4;
}
optional Language language = 1;
optional string solution = 2;
}
// Correct solutions to the problem. Contrast with incorrect_solutions below.
repeated Solution solutions = 8;
// Incorrect solutions.
repeated Solution incorrect_solutions = 19;
// Extra meta-data for codeforces problems. Note that Contest ID is not
// monotonic with respect to time.
optional int32 cf_contest_id = 10;
optional string cf_index = 12; // Problem index, e.g. "A" or "B" or "C", ...
optional float cf_points = 13; // Points for the problem, e.g. 1000.0
optional int32 cf_rating = 14; // Problem rating (difficulty), e.g. 1100
repeated string cf_tags = 15; // Problem tags, e.g. ['greedy', 'math']
// Whether the problem was translated to English.
optional bool is_description_translated = 20;
// The untranslated description is only available for translated problems.
optional string untranslated_description = 21;
// Resource constraints to use when executing solutions.
optional google.protobuf.Duration time_limit = 29;
optional int64 memory_limit_bytes = 30;
// Most problems use stdin and stdout for IO. Some problems expect specific
// files to be used instead.
optional string input_file = 31;
optional string output_file = 32;
}