-
Notifications
You must be signed in to change notification settings - Fork 2
/
config-v2-documentation
245 lines (200 loc) · 7.06 KB
/
config-v2-documentation
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
# Example and explanation of a config file for task made in pisek
# Parsed by configparser.RawConfigParser with checking of unused keys
# See more here: https://docs.python.org/3.10/library/configparser.html
# Move 'config' into a task folder
# Values beginning with ! or @ are reserved and have special meaning:
# - Only ! value is !unset, which is always invalid
# - @ values autoexpand depending on context
[task]
# Task version
# - v1 - Old version, currently not supported. Use 'pisek update' to update to v2.
# - v2 - Current stable version, Added solution sections and redone test sections.
# - v3 - Current experimental version, generalized contest_type to use. More changes incoming
version=v2
# Name of task (for automatic CMS import)
name=a-plus-b
contest_type=cms
# Environment for which is task developed
# kasiopea (default) / cms
task_type=communication
# Task type:
# - batch (default)
# - communication
solutions_subdir=solutions/
# Try to find solutions in this folder relative to config
# Default: .
static_subdir=sample_tests/
# Try to find static inputs and outputs in this folder relative to config
# Default: .
data_subdir=tests/
# Directory for automatically generated files (inputs, outputs, ...)
# Default: data/
tests = ??? (ignored)
# Ignored (because of compatibility with KSP/Kasiopea web)
[tests]
in_gen=src/gen
# Source code of generator (without suffix)
checker=check
# Program (without suffix) that validates inputs
# No value means no checking
out_check=judge
# Describes how to check outputs
# - diff: checks that contestant output equals correct output (ignores whitespace)
# - tokens: uses a fast, versatile file equality checker (ignores whitespace)
# - judge: if there can be multiple solutions, checks with program (called 'judge')
# In communication, only judge is allowed
out_judge=judge
# Only for out_check=judge
# Source code of judge (without suffix)
judge_needs_in=0
judge_needs_out=0
# Only for task_type=batch and out_check=judge
# Set to 1 if judge needs input/output
# Defaults to 1
tokens_ignore_newlines=0
# Only for out_check=tokens
# If set to 1, newline characters will be ignored when checking the output,
# as if they were any other whitespace characters
# By default, newline characters are only ignored at the end of the file
tokens_ignore_case=0
# Only for out_check=tokens
# If set to 1, ASCII characters will be compared in a case-insensitive manner
tokens_float_rel_error=0.00001
tokens_float_abs_error=1e-30
# Only for out_check=tokens
# When these options are specified, floating-point numbers
# will be parsed and compared with a given error margin
# Any tokens that can't be parsed as a float will be compared character-by-character
# If used, both of these options must be specified
# To explicitly disable float checking, set both options to the empty string
stub=src/stub
# Only for C/C++ CMS tasks
# Link each solution with given program (without suffix)
# Used commonly for interactive tasks
headers=src/blecha.h
# Only for C/C++ CMS tasks
# Allow each solution to include the given headers
# Used commonly for interactive tasks
in_mode = ??? (ignored)
out_mode = ??? (ignored)
out_format = ??? (ignored)
online_validity = ??? (ignored)
# Ignored (because of compatibility with KSP/Kasiopea web)
[test01]
# Section for each subtask (indexed from one)
name=Subtask 1
# Name of subtask (optional)
points=3
# Number of points (<int>)
in_globs=01*.in
# Which new inputs are introduced in this subtask.
# Supports expansion of * and ? as in shell
# @ith expands to {subtask_number:02}*.in
# Defaults to @ith
file_name = ??? (ignored)
# Ignored (because of compatibility with KSP/Kasiopea web)
predecessors =
# Space separated list of subtasks easier than this subtask
# Inputs from these subtasks are included into this subtask as well
# @previous expands to previous subtask (or nothing if subtask has number <= 1)
# Defaults to @previous
[test00]
# Section for samples subtasks
# Can be omitted and has the following defaults
name=Samples
points=0
in_globs=sample*.in
predecessors=
[solution_correct]
# Section for each solution
source=solve
# Filename of the program (without suffix)
# Defaults to name of the section without "solution_" (in this case to "correct")
primary=yes
# Use this solution to generate correct outputs?
# Exactly one solution has to be set to primary
# (or zero if there are no solutions in config)
# Defaults to no
points=10
# Points that program should get or X for any number of points
# Defaults to X
points_above=5
points_below=7
# Upper and lower bounds on points
# Default to X
# Cannot be set simultaneously with points
subtasks=X10
# String describing result on each subtask:
# 1 - success
# 0 - fail
# P - partial success
# W - wrong answer
# ! - runtime error
# T - timeout
# X - any result
#
# @all - string of 11...
# @any - string of XX...
# @auto - @all if this is primary solution, @any otherwise
# Defaults to @auto
[limits]
# Resource limits for various programs: all of them are called KEY_LIMIT,
# where KEY is one of:
# in_gen Input generator
# checker Checker
# judge Judge
# solve Primary solution
# sec_solve Secondary solution usually subject to much less strict limits.
# and LIMIT is one of:
# time_limit Execution time limit [seconds]
# clock_limit Wall clock time limit [seconds]
# mem_limit Memory limit [MB]
# process_limit Maximum number of processes -- at the moment,
# limits greater than 1 are interpreted as "unlimited".
# Please keep in mind that killing of multiple processes
# upon errors is inherently unreliable.
#
# Setting limit to 0 means unlimited
#
# Defaults:
# time_limit 360s
# clock_limit 360s
# mem_limit unlimited
# process_limit 1
solve_time_limit=3
input_max_size=20
# Maximal input size [MB]
# (0 for unlimited)
# Defaults to 50
output_max_size=5
# Maximal input size [MB]
# (0 for unlimited)
# Defaults to 10
[cms]
# Settings related to the CMS importer
# See CMS docs (https://cms.readthedocs.io/en/latest/) for details
title=A plus B
# The name of the task shown on the task description page
# @name expands to the task name and is the default
submission_format=adder.%%l
# The name of the submitted file
# .%l will be replaced with the language's file extension ("%" must be escaped as "%%"")
# @name expands to to the task name with non-alphanumeric characters replaced with _ and .%l appended
time_limit=1
# Execution time limit [seconds]
mem_limit=1024
# Memory limit [MB]
max_submissions=50
# The number of submissions one contestant allowed to make, or X for unlimited
# Defaults to 50
min_submission_interval=60
# The number of seconds a contestant has to wait between consecutive submissions
# Defaults to 0
score_precision=0
# How many decimal digits scores are rounded to (defaults to 0)
score_mode=max_subtask
# Describes how the final score is computed from the scores of individual submissions
# May be 'max', 'max_subtask' (default) or 'max_tokened_last'
feedback_level=restricted
# Specifies how much information is given to the contestants about their submission
# May be 'full' or 'restricted' (default)