rbx.cp 0.5.30__tar.gz → 0.5.32__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/PKG-INFO +1 -1
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/pyproject.toml +1 -1
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/code.py +18 -10
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/generators.py +1 -1
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/main.py +7 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/solutions.py +33 -12
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/LICENSE +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/README.md +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/__init__.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/annotations.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/autoenum.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/__init__.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/builder.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/cd.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/checkers.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/compile.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/conftest.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/contest/__init__.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/contest/build_contest_statements.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/contest/contest_package.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/contest/contest_utils.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/contest/main.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/contest/schema.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/contest/statements.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/creation.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/deferred.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/download.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/environment.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/extensions.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/formatting.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/generators_test.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/package.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/packaging/boca/extension.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/packaging/boca/packager.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/packaging/contest_main.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/packaging/main.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/packaging/packager.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/packaging/polygon/packager.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/packaging/polygon/test.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/packaging/polygon/xml_schema.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/presets/__init__.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/presets/fetch.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/presets/lock_schema.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/presets/schema.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/retries.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/sanitizers/warning_stack.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/schema.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/setter_config.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/solutions_test.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/state.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/statements/__init__.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/statements/build_statements.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/statements/builders.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/statements/joiners.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/statements/latex.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/statements/latex_jinja.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/statements/schema.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/stresses.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/stressing/__init__.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/stressing/finder_parser.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/stressing/generator_parser.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/testcases.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/ui/__init__.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/ui/captured_log.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/ui/css/app.tcss +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/ui/main.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/ui/run.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/validators.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/box/validators_test.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/checker.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/clone.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/config.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/conftest.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/console.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/create.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/edit.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/grading/__init__.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/grading/caching.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/grading/conftest.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/grading/judge/__init__.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/grading/judge/cacher.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/grading/judge/digester.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/grading/judge/sandbox.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/grading/judge/sandboxes/__init__.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/grading/judge/sandboxes/isolate.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/grading/judge/sandboxes/stupid_sandbox.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/grading/judge/sandboxes/timeit.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/grading/judge/storage.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/grading/judge/test.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/grading/judge/testiso.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/grading/steps.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/grading/steps_with_caching.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/grading/steps_with_caching_run_test.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/grading_utils.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/hydration.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/main.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/metadata.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/providers/__init__.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/providers/codeforces.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/providers/provider.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/checkers/boilerplate.cpp +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/default_config.json +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/default_setter_config.mac.yml +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/default_setter_config.yml +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/envs/default.rbx.yml +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/envs/isolate.rbx.yml +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/packagers/boca/checker.sh +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/packagers/boca/compare +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/packagers/boca/compile/c +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/packagers/boca/compile/cc +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/packagers/boca/compile/cpp +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/packagers/boca/compile/java +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/packagers/boca/compile/kt +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/packagers/boca/compile/pas +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/packagers/boca/compile/py2 +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/packagers/boca/compile/py3 +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/packagers/boca/run/c +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/packagers/boca/run/cc +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/packagers/boca/run/cpp +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/packagers/boca/run/java +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/packagers/boca/run/kt +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/packagers/boca/run/py2 +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/packagers/boca/run/py3 +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/presets/default/contest/contest.rbx.yml +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/presets/default/contest/statement/contest.rbx.tex +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/presets/default/contest/statement/olymp.sty +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/presets/default/contest/statement/template.rbx.tex +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/presets/default/preset.rbx.yml +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/presets/default/problem/.gitignore +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/presets/default/problem/gen.cpp +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/presets/default/problem/problem.rbx.yml +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/presets/default/problem/random.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/presets/default/problem/random.txt +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/presets/default/problem/sols/main.cpp +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/presets/default/problem/sols/slow.cpp +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/presets/default/problem/sols/wa.cpp +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/presets/default/problem/statement/olymp.sty +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/presets/default/problem/statement/projecao.png +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/presets/default/problem/statement/statement.rbx.tex +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/presets/default/problem/statement/template.rbx.tex +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/presets/default/problem/tests/samples/000.in +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/presets/default/problem/tests/samples/001.in +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/presets/default/problem/validator.cpp +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/presets/default/problem/wcmp.cpp +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/templates/template.cpp +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/run.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/schema.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/submit.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/submitors/__init__.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/submitors/codeforces.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/submitors/submitor.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/test.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/testcase.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/testcase_rendering.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/testdata/box1/gen1.cpp +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/testdata/box1/gen2.cpp +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/testdata/box1/genScript.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/testdata/box1/hard-tle.sol.cpp +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/testdata/box1/ole.cpp +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/testdata/box1/problem.rbx.yml +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/testdata/box1/re.sol.cpp +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/testdata/box1/sol.cpp +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/testdata/box1/tests/1.in +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/testdata/box1/tle-and-incorrect.sol.cpp +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/testdata/box1/tle.sol.cpp +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/testdata/box1/validator.cpp +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/testdata/box1/wa.sol.cpp +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/testdata/caching/executable.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/testdata/compatible +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/testing_utils.py +0 -0
- {rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/utils.py +0 -0
@@ -152,23 +152,26 @@ def _ignore_warning_in_cxx_input(input: GradingFileInput):
|
|
152
152
|
input.src = preprocessed_path
|
153
153
|
|
154
154
|
|
155
|
+
def _format_stack_limit(limit: int) -> str:
|
156
|
+
if limit == resource.RLIM_INFINITY:
|
157
|
+
return 'unlimited'
|
158
|
+
return get_formatted_memory(limit)
|
159
|
+
|
160
|
+
|
155
161
|
def _check_stack_limit():
|
156
162
|
if not state.STATE.run_through_cli:
|
157
163
|
return
|
158
|
-
soft, hard =
|
164
|
+
soft, hard = resource.RLIM_INFINITY, resource.RLIM_INFINITY
|
165
|
+
|
166
|
+
TARGET = 256 * 1024 * 1024 # 256 MiB
|
159
167
|
try:
|
160
168
|
soft, hard = resource.getrlimit(resource.RLIMIT_STACK)
|
161
169
|
except Exception:
|
162
170
|
pass
|
163
171
|
|
164
|
-
if
|
165
|
-
|
166
|
-
|
167
|
-
and soft < hard
|
168
|
-
and soft < 256 * 1024 * 1024 # 256 MiB
|
169
|
-
):
|
170
|
-
soft_fmt = get_formatted_memory(soft)
|
171
|
-
hard_fmt = get_formatted_memory(hard)
|
172
|
+
if soft != hard and soft != resource.RLIM_INFINITY and soft < TARGET:
|
173
|
+
soft_fmt = _format_stack_limit(soft)
|
174
|
+
hard_fmt = _format_stack_limit(hard)
|
172
175
|
console.console.print(
|
173
176
|
f'[error]Stack limit is too low (limit is set as [item]{soft_fmt}[/item], but configured user capacity is [item]{hard_fmt}[/item]).[/error]'
|
174
177
|
)
|
@@ -178,15 +181,20 @@ def _check_stack_limit():
|
|
178
181
|
console.console.print(
|
179
182
|
'To solve this, add the following lines to the end of your [item]~/.bashrc[/item] or [item]~/.zshrc[/item] file (or equivalent shell configuration file):'
|
180
183
|
)
|
184
|
+
|
185
|
+
target_text = TARGET
|
186
|
+
if hard != resource.RLIM_INFINITY:
|
187
|
+
target_text = min(hard, TARGET)
|
181
188
|
console.console.print(
|
182
189
|
"""
|
183
190
|
```
|
184
191
|
export RBX_BIN_PATH=`which rbx`
|
185
192
|
function rbx() {
|
186
|
-
ulimit -s
|
193
|
+
ulimit -s %s && $RBX_BIN_PATH $@
|
187
194
|
}
|
188
195
|
```
|
189
196
|
"""
|
197
|
+
% target_text
|
190
198
|
)
|
191
199
|
console.console.print()
|
192
200
|
console.console.print(
|
@@ -435,7 +435,7 @@ def generate_standalone(
|
|
435
435
|
validator_digest,
|
436
436
|
)
|
437
437
|
if not ok:
|
438
|
-
_print_error_header('
|
438
|
+
_print_error_header('failed validating testcase.')
|
439
439
|
console.console.print(f'[error]Message:[/error] {message}')
|
440
440
|
console.console.print(
|
441
441
|
f'Testcase written at [item]{spec.copied_to.inputPath}[/item]'
|
@@ -359,6 +359,12 @@ def irun(
|
|
359
359
|
'-t',
|
360
360
|
help='Testcase to run, in the format "[group]/[index]". If not specified, will run interactively.',
|
361
361
|
),
|
362
|
+
output: bool = typer.Option(
|
363
|
+
False,
|
364
|
+
'--output',
|
365
|
+
'-o',
|
366
|
+
help='Whether to ask user for custom output.',
|
367
|
+
),
|
362
368
|
print: bool = typer.Option(
|
363
369
|
False, '--print', '-p', help='Whether to print outputs to terminal.'
|
364
370
|
),
|
@@ -421,6 +427,7 @@ def irun(
|
|
421
427
|
if generator is not None
|
422
428
|
else None,
|
423
429
|
testcase_entry=TestcaseEntry.parse(testcase) if testcase else None,
|
430
|
+
custom_output=output,
|
424
431
|
print=print,
|
425
432
|
sanitized=sanitized,
|
426
433
|
)
|
@@ -431,6 +431,7 @@ async def _generate_testcase_interactively(
|
|
431
431
|
generator: Optional[GeneratorCall] = None,
|
432
432
|
testcase_entry: Optional[TestcaseEntry] = None,
|
433
433
|
check: bool = True,
|
434
|
+
custom_output: bool = False,
|
434
435
|
sanitized: bool = False,
|
435
436
|
print: bool = False,
|
436
437
|
) -> Testcase:
|
@@ -469,7 +470,7 @@ async def _generate_testcase_interactively(
|
|
469
470
|
if (
|
470
471
|
testcase.outputPath is not None
|
471
472
|
and not testcase.outputPath.is_file()
|
472
|
-
and main_solution is None
|
473
|
+
and (main_solution is None or custom_output)
|
473
474
|
):
|
474
475
|
with utils.no_progress(progress):
|
475
476
|
output = console.multiline_prompt('Testcase output')
|
@@ -605,6 +606,7 @@ async def run_and_print_interactive_solutions(
|
|
605
606
|
generator: Optional[GeneratorCall] = None,
|
606
607
|
testcase_entry: Optional[TestcaseEntry] = None,
|
607
608
|
check: bool = True,
|
609
|
+
custom_output: bool = False,
|
608
610
|
print: bool = False,
|
609
611
|
sanitized: bool = False,
|
610
612
|
):
|
@@ -619,6 +621,7 @@ async def run_and_print_interactive_solutions(
|
|
619
621
|
generator=generator,
|
620
622
|
testcase_entry=testcase_entry,
|
621
623
|
check=check,
|
624
|
+
custom_output=custom_output,
|
622
625
|
sanitized=sanitized,
|
623
626
|
print=print,
|
624
627
|
)
|
@@ -895,33 +898,51 @@ def _print_solution_header(
|
|
895
898
|
console.print(f'({solution_testdir})')
|
896
899
|
|
897
900
|
|
901
|
+
@dataclasses.dataclass
|
902
|
+
class TimingSummary:
|
903
|
+
slowest_good: Optional[int] = None
|
904
|
+
fastest_slow: Optional[int] = None
|
905
|
+
|
906
|
+
def add_good(self, time: int):
|
907
|
+
if self.slowest_good is None or time > self.slowest_good:
|
908
|
+
self.slowest_good = time
|
909
|
+
|
910
|
+
def add_slow(self, time: int):
|
911
|
+
if self.fastest_slow is None or time < self.fastest_slow:
|
912
|
+
self.fastest_slow = time
|
913
|
+
|
914
|
+
|
898
915
|
async def _print_timing(
|
899
916
|
console: rich.console.Console,
|
900
917
|
skeleton: SolutionReportSkeleton,
|
901
918
|
evaluations: StructuredEvaluation,
|
902
919
|
):
|
903
|
-
|
904
|
-
|
920
|
+
summary = TimingSummary()
|
921
|
+
sumamry_per_language = collections.defaultdict(TimingSummary)
|
905
922
|
for solution in skeleton.solutions:
|
906
923
|
all_evals = []
|
907
924
|
for evals in evaluations[str(solution.path)].values():
|
908
925
|
all_evals.extend([await eval() for eval in evals if eval is not None])
|
909
926
|
solution_time = _get_evals_time_in_ms(all_evals)
|
910
927
|
if solution.outcome.match(Outcome.ACCEPTED):
|
911
|
-
|
912
|
-
|
928
|
+
summary.add_good(solution_time)
|
929
|
+
sumamry_per_language[solution.language].add_good(solution_time)
|
913
930
|
if solution.outcome.is_slow():
|
914
|
-
|
915
|
-
|
931
|
+
summary.add_slow(solution_time)
|
932
|
+
sumamry_per_language[solution.language].add_slow(solution_time)
|
916
933
|
|
917
|
-
if slowest_good is None and fastest_slow is None:
|
934
|
+
if summary.slowest_good is None and summary.fastest_slow is None:
|
918
935
|
return
|
919
936
|
|
920
937
|
console.print('[status]Timing summary:[/status]')
|
921
|
-
if slowest_good is not None:
|
922
|
-
console.print(
|
923
|
-
|
924
|
-
|
938
|
+
if summary.slowest_good is not None:
|
939
|
+
console.print(
|
940
|
+
f'Slowest [success]OK[/success] solution: {summary.slowest_good} ms'
|
941
|
+
)
|
942
|
+
if summary.fastest_slow is not None:
|
943
|
+
console.print(
|
944
|
+
f'Fastest [error]slow[/error] solution: {summary.fastest_slow} ms'
|
945
|
+
)
|
925
946
|
|
926
947
|
|
927
948
|
def _length_markup(markup: str) -> int:
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/presets/default/contest/statement/contest.rbx.tex
RENAMED
File without changes
|
File without changes
|
{rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/presets/default/contest/statement/template.rbx.tex
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/presets/default/problem/statement/projecao.png
RENAMED
File without changes
|
{rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/presets/default/problem/statement/statement.rbx.tex
RENAMED
File without changes
|
{rbx_cp-0.5.30 → rbx_cp-0.5.32}/rbx/resources/presets/default/problem/statement/template.rbx.tex
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|