SmallMath dataset builder commited on
Commit ·
de0a028
0
Parent(s):
Build SmallMath Harbor evaluation dataset
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +1 -0
- README.md +57 -0
- scripts/verify.py +34 -0
- subsets/all_tasks.jsonl +600 -0
- subsets/level_1.jsonl +100 -0
- subsets/level_2.jsonl +100 -0
- subsets/level_3.jsonl +100 -0
- subsets/level_4.jsonl +100 -0
- subsets/level_5.jsonl +100 -0
- subsets/level_6.jsonl +100 -0
- tasks/manifest.json +0 -0
- tasks/smallmath-0015/instruction.md +11 -0
- tasks/smallmath-0015/solution/solve.sh +5 -0
- tasks/smallmath-0015/task.toml +29 -0
- tasks/smallmath-0015/tests/grade_task.py +90 -0
- tasks/smallmath-0015/tests/grader.py +501 -0
- tasks/smallmath-0015/tests/mpmath-1.3.0-py3-none-any.whl.b64 +0 -0
- tasks/smallmath-0015/tests/reference.json +1 -0
- tasks/smallmath-0015/tests/sympy-1.14.0-py3-none-any.whl.b64 +0 -0
- tasks/smallmath-0015/tests/test.sh +12 -0
- tasks/smallmath-0030/instruction.md +9 -0
- tasks/smallmath-0030/solution/solve.sh +5 -0
- tasks/smallmath-0030/task.toml +29 -0
- tasks/smallmath-0030/tests/grade_task.py +90 -0
- tasks/smallmath-0030/tests/grader.py +501 -0
- tasks/smallmath-0030/tests/mpmath-1.3.0-py3-none-any.whl.b64 +0 -0
- tasks/smallmath-0030/tests/reference.json +1 -0
- tasks/smallmath-0030/tests/sympy-1.14.0-py3-none-any.whl.b64 +0 -0
- tasks/smallmath-0030/tests/test.sh +12 -0
- tasks/smallmath-0032/instruction.md +11 -0
- tasks/smallmath-0032/solution/solve.sh +5 -0
- tasks/smallmath-0032/task.toml +29 -0
- tasks/smallmath-0032/tests/grade_task.py +90 -0
- tasks/smallmath-0032/tests/grader.py +501 -0
- tasks/smallmath-0032/tests/mpmath-1.3.0-py3-none-any.whl.b64 +0 -0
- tasks/smallmath-0032/tests/reference.json +1 -0
- tasks/smallmath-0032/tests/sympy-1.14.0-py3-none-any.whl.b64 +0 -0
- tasks/smallmath-0032/tests/test.sh +12 -0
- tasks/smallmath-0036/instruction.md +9 -0
- tasks/smallmath-0036/solution/solve.sh +5 -0
- tasks/smallmath-0036/task.toml +29 -0
- tasks/smallmath-0036/tests/grade_task.py +90 -0
- tasks/smallmath-0036/tests/grader.py +501 -0
- tasks/smallmath-0036/tests/mpmath-1.3.0-py3-none-any.whl.b64 +0 -0
- tasks/smallmath-0036/tests/reference.json +1 -0
- tasks/smallmath-0036/tests/sympy-1.14.0-py3-none-any.whl.b64 +0 -0
- tasks/smallmath-0036/tests/test.sh +12 -0
- tasks/smallmath-0037/instruction.md +13 -0
- tasks/smallmath-0037/solution/solve.sh +5 -0
- tasks/smallmath-0037/task.toml +29 -0
.gitattributes
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
*.whl.b64 -filter -diff -merge text
|
README.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-nc-sa-4.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
pretty_name: SmallMath Harbor Evaluation
|
| 6 |
+
tags:
|
| 7 |
+
- library:harbor
|
| 8 |
+
- harbor
|
| 9 |
+
- math
|
| 10 |
+
- evaluation
|
| 11 |
+
- agent-environment
|
| 12 |
+
- license:cc-by-nc-sa-4.0
|
| 13 |
+
size_categories:
|
| 14 |
+
- n<1K
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
# SmallMath Harbor Evaluation
|
| 18 |
+
|
| 19 |
+
A pure Harbor v1.4 evaluation dataset containing all 600 problems from [MathArena/smallmath](https://huggingface.co/datasets/MathArena/smallmath), source revision [13ef9727659718de8bcba221cfe8f8a65bf88a99](https://huggingface.co/datasets/MathArena/smallmath/tree/13ef9727659718de8bcba221cfe8f8a65bf88a99). The problems, integer answer keys, difficulty levels, and source provenance are the work of MathArena and its contributors. This adaptation packages the upstream problem statements and answer keys as Harbor tasks, with oracle scripts, a verifier, and stratified task indexes. The upstream data is licensed [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/); this dataset preserves that license, including its attribution, noncommercial, and share-alike conditions. See the upstream dataset card for the original data, full field definitions, and further source details.
|
| 20 |
+
|
| 21 |
+
MathArena describes its problems as drawn from 2026 mathematics competitions, converted to LaTeX, rephrased and verified, and where necessary adapted to single-integer answers. The benchmark covers six levels of difficulty, from 1 (easiest) to 6 (hardest).
|
| 22 |
+
|
| 23 |
+
| Level | Tasks | Gold answer kind |
|
| 24 |
+
| --- | ---: | --- |
|
| 25 |
+
| 1 | 100 | integer |
|
| 26 |
+
| 2 | 100 | integer |
|
| 27 |
+
| 3 | 100 | integer |
|
| 28 |
+
| 4 | 100 | integer |
|
| 29 |
+
| 5 | 100 | integer |
|
| 30 |
+
| 6 | 100 | integer |
|
| 31 |
+
| **Total** | **600** | **600 integers; 0 structured or other** |
|
| 32 |
+
|
| 33 |
+
All 600 rows and all 18 source columns were inspected. Every gold answer matches a signed-integer pattern. Each task instruction preserves the upstream `problem` text and each reference preserves its `answer`; `tasks/manifest.json` maps task IDs to upstream IDs and source provenance, including original topic labels and transformation notes. `subsets/all_tasks.jsonl` lists every task, and `subsets/level_1.jsonl` through `subsets/level_6.jsonl` list the 100 tasks at each level. Each JSONL line contains a task ID and metadata.
|
| 34 |
+
|
| 35 |
+
## Task and grading contract
|
| 36 |
+
|
| 37 |
+
Each `tasks/<task_id>` is a standalone Harbor task: `instruction.md`, `task.toml`, `solution/solve.sh`, and `tests/`. The agent writes one exact number to `/app/answer.txt`. The verifier awards 1 for exact mathematical equality with the gold integer, otherwise 0; it does not use numeric tolerance. Exact fractions and supported exact expressions can also be accepted when provably equal. Inputs outside the restricted parser, unprovable equivalences, and timeouts fail closed. The verifier rejects absent, empty, oversized (more than 10,000 bytes), symlinked, hard-linked and non-regular answer files. It reads path components without following symlinks.
|
| 38 |
+
|
| 39 |
+
The verifier and exact-number grader are reused from [HuggingFaceSwarms/aops-math-bench](https://huggingface.co/datasets/HuggingFaceSwarms/aops-math-bench), revision `3f6f3d5f1f03ea2fc92b303c91036085a957aadb`. The grader extracts pinned, hash-checked SymPy 1.14.0 and mpmath 1.3.0 wheels offline from plain-text base64 files, so verification needs no package download or Git LFS. The task image is `docker.io/library/python:3.12-slim`, with one CPU and 2048 MB memory. Agent and verifier use allowlist network mode; their timeouts are 3600 and 180 seconds respectively.
|
| 40 |
+
|
| 41 |
+
## Local verification
|
| 42 |
+
|
| 43 |
+
Run `python3 scripts/verify.py` to execute every solution and test script using temporary answer and verifier paths, followed by wrong-answer, empty, missing, symlink, oversized, and FIFO rejection cases sampled once per level. The verification uses the local `python3`; Harbor uses the declared Python 3.12 image. Oracle success checks packaging and grader compatibility with the source keys, not the independent mathematical correctness of those keys. The encoded wheel files are ordinary Git text, not LFS pointers. On 2026-11-27, local verification passed **600/600 oracle tasks** and **36/36 negative checks** (the six cases above on one task from each level), using Python 3.11 on the host. All 5,400 task files were checked as UTF-8 text without LFS pointers or NUL bytes; both encoded wheels decoded to their pinned SHA-256 hashes.
|
| 44 |
+
|
| 45 |
+
## Citation
|
| 46 |
+
|
| 47 |
+
```bibtex
|
| 48 |
+
@article{dekoninck2026matharena,
|
| 49 |
+
title={Beyond Benchmarks: MathArena as an Evaluation Platform for Mathematics with LLMs},
|
| 50 |
+
author={Dekoninck, Jasper and Jovanović, Nikola and Gehrunger, Tim and Rögnvaldsson, Kári and Petrov, Ivo and Sun, Chenhao and Vechev, Martin},
|
| 51 |
+
year={2026},
|
| 52 |
+
eprint={2605.00674},
|
| 53 |
+
archivePrefix={arXiv},
|
| 54 |
+
primaryClass={cs.CL},
|
| 55 |
+
url={https://arxiv.org/abs/2605.00674}
|
| 56 |
+
}
|
| 57 |
+
```
|
scripts/verify.py
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Run every oracle and sample rejection checks. Requires bash, python3 and timeout."""
|
| 3 |
+
import concurrent.futures, json, os, pathlib, subprocess, tempfile
|
| 4 |
+
ROOT=pathlib.Path(__file__).resolve().parents[1]
|
| 5 |
+
tasks=sorted(p for p in (ROOT/'tasks').iterdir() if p.is_dir())
|
| 6 |
+
assert len(tasks)==600
|
| 7 |
+
|
| 8 |
+
def run(task, case='oracle'):
|
| 9 |
+
with tempfile.TemporaryDirectory(prefix='smallmath-check-') as tmp:
|
| 10 |
+
p=pathlib.Path(tmp); answer=p/'answer.txt'; out=p/'verifier'; out.mkdir(); temp=p/'temp'; temp.mkdir()
|
| 11 |
+
env={**os.environ,'ANSWER':str(answer),'VERIFIER_DIR':str(out),'TMPDIR':str(temp),'PYTHONDONTWRITEBYTECODE':'1'}
|
| 12 |
+
if case=='oracle': subprocess.run(['bash',str(task/'solution/solve.sh')],env=env,check=True,capture_output=True)
|
| 13 |
+
elif case=='wrong': answer.write_text(str(int(json.loads((task/'tests/reference.json').read_text())['answer'])+1))
|
| 14 |
+
elif case=='empty': answer.touch()
|
| 15 |
+
elif case=='symlink':
|
| 16 |
+
target=p/'target'; target.write_text(json.loads((task/'tests/reference.json').read_text())['answer']); answer.symlink_to(target)
|
| 17 |
+
elif case=='oversized': answer.write_text('0'*10001)
|
| 18 |
+
elif case=='fifo': os.mkfifo(answer)
|
| 19 |
+
elif case!='missing': raise ValueError(case)
|
| 20 |
+
result=subprocess.run(['bash',str(task/'tests/test.sh')],env=env,check=True,capture_output=True,text=True,timeout=180)
|
| 21 |
+
reward=(out/'reward.txt').read_text().strip(); expected='1' if case=='oracle' else '0'
|
| 22 |
+
return task.name,case,reward,expected,result.stdout.strip(),(out/'grade.json').read_text()
|
| 23 |
+
|
| 24 |
+
if __name__=='__main__':
|
| 25 |
+
failures=[]
|
| 26 |
+
with concurrent.futures.ThreadPoolExecutor(max_workers=4) as pool:
|
| 27 |
+
for i,r in enumerate(pool.map(run,tasks),1):
|
| 28 |
+
if r[2]!=r[3]: failures.append(r); print('FAIL',r,flush=True)
|
| 29 |
+
if i%50==0: print('oracle',i,'/',len(tasks),'failures',len(failures),flush=True)
|
| 30 |
+
sample=[next(t for t in tasks if f'level = {i}\n' in (t/'task.toml').read_text()) for i in range(1,7)]
|
| 31 |
+
results=[run(t,c) for t in sample for c in ['wrong','empty','missing','symlink','oversized','fifo']]
|
| 32 |
+
failures.extend(r for r in results if r[2]!=r[3]); print('negative',len(results)-sum(r[2]!=r[3] for r in results),'/',len(results),flush=True)
|
| 33 |
+
print('failures',json.dumps(failures),flush=True)
|
| 34 |
+
assert not failures
|
subsets/all_tasks.jsonl
ADDED
|
@@ -0,0 +1,600 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"task": "smallmath-0015", "problem_id": 15, "stable_id": "aime_2026_i_15", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 2 |
+
{"task": "smallmath-0030", "problem_id": 30, "stable_id": "aime_2026_ii_15", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 3 |
+
{"task": "smallmath-0032", "problem_id": 32, "stable_id": "hmmt_feb_2026_algnt_02", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 4 |
+
{"task": "smallmath-0036", "problem_id": 36, "stable_id": "hmmt_feb_2026_algnt_06", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 5 |
+
{"task": "smallmath-0037", "problem_id": 37, "stable_id": "hmmt_feb_2026_algnt_07", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 6 |
+
{"task": "smallmath-0039", "problem_id": 39, "stable_id": "hmmt_feb_2026_algnt_09", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 7 |
+
{"task": "smallmath-0047", "problem_id": 47, "stable_id": "hmmt_feb_2026_comb_07", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 8 |
+
{"task": "smallmath-0048", "problem_id": 48, "stable_id": "hmmt_feb_2026_comb_08", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 9 |
+
{"task": "smallmath-0050", "problem_id": 50, "stable_id": "hmmt_feb_2026_comb_10", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 10 |
+
{"task": "smallmath-0053", "problem_id": 53, "stable_id": "hmmt_feb_2026_geo_03", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 11 |
+
{"task": "smallmath-0056", "problem_id": 56, "stable_id": "hmmt_feb_2026_geo_06", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 12 |
+
{"task": "smallmath-0057", "problem_id": 57, "stable_id": "hmmt_feb_2026_geo_07", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 13 |
+
{"task": "smallmath-0061", "problem_id": 61, "stable_id": "hmmt_feb_2026_team_02", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 14 |
+
{"task": "smallmath-0063", "problem_id": 63, "stable_id": "hmmt_feb_2026_team_05", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 15 |
+
{"task": "smallmath-0064", "problem_id": 64, "stable_id": "ukmt_smc_2026_01", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 16 |
+
{"task": "smallmath-0104", "problem_id": 104, "stable_id": "ukmt_imc_2026_17", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 17 |
+
{"task": "smallmath-0121", "problem_id": 121, "stable_id": "cmimc_2026_combo_01", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 18 |
+
{"task": "smallmath-0124", "problem_id": 124, "stable_id": "cmimc_2026_combo_04", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 19 |
+
{"task": "smallmath-0142", "problem_id": 142, "stable_id": "cmimc_2026_team_07", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 20 |
+
{"task": "smallmath-0154", "problem_id": 154, "stable_id": "hmmt_feb_2026_guts_09", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 21 |
+
{"task": "smallmath-0158", "problem_id": 158, "stable_id": "hmmt_feb_2026_guts_13", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 22 |
+
{"task": "smallmath-0163", "problem_id": 163, "stable_id": "hmmt_feb_2026_guts_18", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 23 |
+
{"task": "smallmath-0165", "problem_id": 165, "stable_id": "hmmt_feb_2026_guts_20", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 24 |
+
{"task": "smallmath-0166", "problem_id": 166, "stable_id": "hmmt_feb_2026_guts_21", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 25 |
+
{"task": "smallmath-0179", "problem_id": 179, "stable_id": "hmmt_feb_2026_team_07", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 26 |
+
{"task": "smallmath-0181", "problem_id": 181, "stable_id": "usamo_2026_04", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 27 |
+
{"task": "smallmath-0182", "problem_id": 182, "stable_id": "usajmo_2026_02", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 28 |
+
{"task": "smallmath-0183", "problem_id": 183, "stable_id": "imo_2026_03", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 29 |
+
{"task": "smallmath-0185", "problem_id": 185, "stable_id": "usa_tstst_2026_02", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 30 |
+
{"task": "smallmath-0186", "problem_id": 186, "stable_id": "usa_tstst_2026_03", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 31 |
+
{"task": "smallmath-0187", "problem_id": 187, "stable_id": "usa_tstst_2026_04", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 32 |
+
{"task": "smallmath-0189", "problem_id": 189, "stable_id": "usa_egmotst_2026_04", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 33 |
+
{"task": "smallmath-0190", "problem_id": 190, "stable_id": "egmo_2026_01", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 34 |
+
{"task": "smallmath-0195", "problem_id": 195, "stable_id": "balkan_2026_01", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 35 |
+
{"task": "smallmath-0196", "problem_id": 196, "stable_id": "balkan_2026_04", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 36 |
+
{"task": "smallmath-0197", "problem_id": 197, "stable_id": "british_bmo2_2026_01", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 37 |
+
{"task": "smallmath-0198", "problem_id": 198, "stable_id": "nordic_2026_01", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 38 |
+
{"task": "smallmath-0200", "problem_id": 200, "stable_id": "cmo_2026_03", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 39 |
+
{"task": "smallmath-0202", "problem_id": 202, "stable_id": "cjmo_2026_01", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 40 |
+
{"task": "smallmath-0206", "problem_id": 206, "stable_id": "inmo_2026_06", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 41 |
+
{"task": "smallmath-0233", "problem_id": 233, "stable_id": "ioqm_2026_m1_22", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 42 |
+
{"task": "smallmath-0235", "problem_id": 235, "stable_id": "ioqm_2026_m1_24", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 43 |
+
{"task": "smallmath-0251", "problem_id": 251, "stable_id": "arml_2026_team_10", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 44 |
+
{"task": "smallmath-0258", "problem_id": 258, "stable_id": "arml_2026_individual_07", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 45 |
+
{"task": "smallmath-0287", "problem_id": 287, "stable_id": "arml_2026_power_01b", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 46 |
+
{"task": "smallmath-0299", "problem_id": 299, "stable_id": "bmmt_2026_individual_09", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 47 |
+
{"task": "smallmath-0309", "problem_id": 309, "stable_id": "bmmt_2026_individual_19", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 48 |
+
{"task": "smallmath-0311", "problem_id": 311, "stable_id": "bmmt_2026_team_01", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 49 |
+
{"task": "smallmath-0316", "problem_id": 316, "stable_id": "bmmt_2026_team_06", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 50 |
+
{"task": "smallmath-0318", "problem_id": 318, "stable_id": "bmmt_2026_team_08", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 51 |
+
{"task": "smallmath-0325", "problem_id": 325, "stable_id": "bmmt_2026_team_15", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 52 |
+
{"task": "smallmath-0327", "problem_id": 327, "stable_id": "bmmt_2026_team_17", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 53 |
+
{"task": "smallmath-0330", "problem_id": 330, "stable_id": "bmmt_2026_team_20", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 54 |
+
{"task": "smallmath-0353", "problem_id": 353, "stable_id": "ukmt_cayley_2026_05", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 55 |
+
{"task": "smallmath-0359", "problem_id": 359, "stable_id": "ukmt_hamilton_2026_06", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 56 |
+
{"task": "smallmath-0365", "problem_id": 365, "stable_id": "ukmt_maclaurin_2026_06", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 57 |
+
{"task": "smallmath-0383", "problem_id": 383, "stable_id": "ukmt_pink_2026_20", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 58 |
+
{"task": "smallmath-0428", "problem_id": 428, "stable_id": "ukmt_grey_2026_23", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 59 |
+
{"task": "smallmath-0473", "problem_id": 473, "stable_id": "purplecomet_2026_hs_21", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 60 |
+
{"task": "smallmath-0477", "problem_id": 477, "stable_id": "purplecomet_2026_hs_25", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 61 |
+
{"task": "smallmath-0483", "problem_id": 483, "stable_id": "purplecomet_2026_ms_01", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 62 |
+
{"task": "smallmath-0490", "problem_id": 490, "stable_id": "purplecomet_2026_ms_08", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 63 |
+
{"task": "smallmath-0496", "problem_id": 496, "stable_id": "purplecomet_2026_ms_14", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 64 |
+
{"task": "smallmath-0499", "problem_id": 499, "stable_id": "purplecomet_2026_ms_17", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 65 |
+
{"task": "smallmath-0514", "problem_id": 514, "stable_id": "swiss_final_2026_8", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 66 |
+
{"task": "smallmath-0521", "problem_id": 521, "stable_id": "austria_gwf_2026_3", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 67 |
+
{"task": "smallmath-0525", "problem_id": 525, "stable_id": "austria_bwf_2026_3", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 68 |
+
{"task": "smallmath-0528", "problem_id": 528, "stable_id": "dutch_r1_2026_a2", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 69 |
+
{"task": "smallmath-0538", "problem_id": 538, "stable_id": "dutch_r2_2026_b2", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 70 |
+
{"task": "smallmath-0544", "problem_id": 544, "stable_id": "nzmo_2026_round1_01", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 71 |
+
{"task": "smallmath-0548", "problem_id": 548, "stable_id": "mathprize_girls_2026_01", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 72 |
+
{"task": "smallmath-0549", "problem_id": 549, "stable_id": "mathprize_girls_2026_02", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 73 |
+
{"task": "smallmath-0560", "problem_id": 560, "stable_id": "mathprize_girls_2026_13", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 74 |
+
{"task": "smallmath-0567", "problem_id": 567, "stable_id": "mathprize_2026_20", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 75 |
+
{"task": "smallmath-0601", "problem_id": 601, "stable_id": "waterloo_2026_cayley_13", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 76 |
+
{"task": "smallmath-0638", "problem_id": 638, "stable_id": "waterloo_2026_fermat_25", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 77 |
+
{"task": "smallmath-0644", "problem_id": 644, "stable_id": "waterloo_2026_euclid_02c", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 78 |
+
{"task": "smallmath-0681", "problem_id": 681, "stable_id": "waterloo_2026_galois_03c", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 79 |
+
{"task": "smallmath-0688", "problem_id": 688, "stable_id": "waterloo_2026_hypatia_02a", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 80 |
+
{"task": "smallmath-0705", "problem_id": 705, "stable_id": "waterloo_2026_ctmc_team_01", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 81 |
+
{"task": "smallmath-0706", "problem_id": 706, "stable_id": "waterloo_2026_ctmc_team_02", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 82 |
+
{"task": "smallmath-0708", "problem_id": 708, "stable_id": "waterloo_2026_ctmc_team_04", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 83 |
+
{"task": "smallmath-0713", "problem_id": 713, "stable_id": "waterloo_2026_ctmc_team_09", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 84 |
+
{"task": "smallmath-0719", "problem_id": 719, "stable_id": "waterloo_2026_ctmc_team_16", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 85 |
+
{"task": "smallmath-0730", "problem_id": 730, "stable_id": "waterloo_2026_ctmc_relay_1_b", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 86 |
+
{"task": "smallmath-0735", "problem_id": 735, "stable_id": "waterloo_2026_ctmc_relay_3_a", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 87 |
+
{"task": "smallmath-0788", "problem_id": 788, "stable_id": "benelux_2026_04", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 88 |
+
{"task": "smallmath-0790", "problem_id": 790, "stable_id": "poland_final_2026_02", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 89 |
+
{"task": "smallmath-0797", "problem_id": 797, "stable_id": "germany_bwm_r2_2026_03", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 90 |
+
{"task": "smallmath-0799", "problem_id": 799, "stable_id": "ireland_2026_03", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 91 |
+
{"task": "smallmath-0803", "problem_id": 803, "stable_id": "japan_final_2026_03", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 92 |
+
{"task": "smallmath-0806", "problem_id": 806, "stable_id": "memo_individual_2026_02", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 93 |
+
{"task": "smallmath-0811", "problem_id": 811, "stable_id": "elon_lages_2026_05", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 94 |
+
{"task": "smallmath-0825", "problem_id": 825, "stable_id": "bamo_2026_4", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 95 |
+
{"task": "smallmath-0826", "problem_id": 826, "stable_id": "bamo_2026_5", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 96 |
+
{"task": "smallmath-0829", "problem_id": 829, "stable_id": "taiwan_egmo_prelim_2026_03", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 97 |
+
{"task": "smallmath-0843", "problem_id": 843, "stable_id": "taiwan_tmo_2026_03", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 98 |
+
{"task": "smallmath-0853", "problem_id": 853, "stable_id": "italy_team_final_2026_09", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 99 |
+
{"task": "smallmath-0858", "problem_id": 858, "stable_id": "italy_team_final_2026_14", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 100 |
+
{"task": "smallmath-0859", "problem_id": 859, "stable_id": "italy_team_final_2026_16", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 101 |
+
{"task": "smallmath-0862", "problem_id": 862, "stable_id": "italy_team_final_2026_19", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 102 |
+
{"task": "smallmath-0863", "problem_id": 863, "stable_id": "italy_team_final_2026_20", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 103 |
+
{"task": "smallmath-0864", "problem_id": 864, "stable_id": "italy_team_final_2026_21", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 104 |
+
{"task": "smallmath-0874", "problem_id": 874, "stable_id": "italy_team_semifinal1_2026_10", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 105 |
+
{"task": "smallmath-0880", "problem_id": 880, "stable_id": "italy_team_semifinal1_2026_16", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 106 |
+
{"task": "smallmath-0890", "problem_id": 890, "stable_id": "italy_district_2026_11", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 107 |
+
{"task": "smallmath-0900", "problem_id": 900, "stable_id": "italy_team_female_final_2026_06", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 108 |
+
{"task": "smallmath-0920", "problem_id": 920, "stable_id": "italy_individual_final_2026_05", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 109 |
+
{"task": "smallmath-0921", "problem_id": 921, "stable_id": "italy_coordinators_2026_01", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 110 |
+
{"task": "smallmath-0925", "problem_id": 925, "stable_id": "italy_coordinators_2026_05", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 111 |
+
{"task": "smallmath-0927", "problem_id": 927, "stable_id": "italy_coordinators_2026_07", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 112 |
+
{"task": "smallmath-0930", "problem_id": 930, "stable_id": "italy_individual_final_2026_06", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 113 |
+
{"task": "smallmath-0932", "problem_id": 932, "stable_id": "pamo_2026_06", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 114 |
+
{"task": "smallmath-0934", "problem_id": 934, "stable_id": "philippines_pmo_national_2026_02", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 115 |
+
{"task": "smallmath-0939", "problem_id": 939, "stable_id": "maio_2026_l2_01", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 116 |
+
{"task": "smallmath-0952", "problem_id": 952, "stable_id": "obm_2026_l3_03", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 117 |
+
{"task": "smallmath-0954", "problem_id": 954, "stable_id": "obm_2026_univ_02", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 118 |
+
{"task": "smallmath-0955", "problem_id": 955, "stable_id": "ibero_2026_01", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 119 |
+
{"task": "smallmath-10036", "problem_id": 10036, "stable_id": "azerbaijan_rfo_2026_regional_g8_10", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 120 |
+
{"task": "smallmath-10068", "problem_id": 10068, "stable_id": "uwosh_2026_team_05", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 121 |
+
{"task": "smallmath-10170", "problem_id": 10170, "stable_id": "utah_state_2026_junior_08", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 122 |
+
{"task": "smallmath-10178", "problem_id": 10178, "stable_id": "utah_state_2026_junior_16", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 123 |
+
{"task": "smallmath-10194", "problem_id": 10194, "stable_id": "utah_state_2026_senior_02", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 124 |
+
{"task": "smallmath-10213", "problem_id": 10213, "stable_id": "utah_state_2026_senior_24", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 125 |
+
{"task": "smallmath-10360", "problem_id": 10360, "stable_id": "jamaica_jmo_2026_junior_final_g4_14", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 126 |
+
{"task": "smallmath-10406", "problem_id": 10406, "stable_id": "cwml_2026_meet2_geometry_03", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 127 |
+
{"task": "smallmath-10559", "problem_id": 10559, "stable_id": "azerbaijan_rfm_2026_final_g7_08", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 128 |
+
{"task": "smallmath-1057", "problem_id": 1057, "stable_id": "emcc_2026_team_15", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 129 |
+
{"task": "smallmath-10577", "problem_id": 10577, "stable_id": "romania_comper_2026_stage2_g8_11", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 130 |
+
{"task": "smallmath-10605", "problem_id": 10605, "stable_id": "romania_comper_2026_stage2_g6_03", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 131 |
+
{"task": "smallmath-10639", "problem_id": 10639, "stable_id": "romania_comper_2026_stage2_g4_05", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 132 |
+
{"task": "smallmath-10659", "problem_id": 10659, "stable_id": "romania_comper_2026_stage2_g3_08", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 133 |
+
{"task": "smallmath-10664", "problem_id": 10664, "stable_id": "romania_comper_2026_stage2_g3_13", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 134 |
+
{"task": "smallmath-10671", "problem_id": 10671, "stable_id": "romania_comper_2026_stage2_g2_02", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 135 |
+
{"task": "smallmath-10679", "problem_id": 10679, "stable_id": "romania_comper_2026_stage2_g2_10", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 136 |
+
{"task": "smallmath-10683", "problem_id": 10683, "stable_id": "romania_comper_2026_stage2_g2_14", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 137 |
+
{"task": "smallmath-10684", "problem_id": 10684, "stable_id": "romania_comper_2026_stage2_g2_15", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 138 |
+
{"task": "smallmath-10694", "problem_id": 10694, "stable_id": "romania_comper_2026_stage2_g1_08", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 139 |
+
{"task": "smallmath-10699", "problem_id": 10699, "stable_id": "romania_comper_2026_stage2_g1_13", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 140 |
+
{"task": "smallmath-10702", "problem_id": 10702, "stable_id": "romania_comper_2026_stage2_g1_16", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 141 |
+
{"task": "smallmath-10712", "problem_id": 10712, "stable_id": "romania_comper_2026_stage2_g0_09", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 142 |
+
{"task": "smallmath-1072", "problem_id": 1072, "stable_id": "emcc_2026_guts_15", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 143 |
+
{"task": "smallmath-10727", "problem_id": 10727, "stable_id": "charleston_2026_level1_16", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 144 |
+
{"task": "smallmath-10755", "problem_id": 10755, "stable_id": "charleston_2026_level2_24", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 145 |
+
{"task": "smallmath-10776", "problem_id": 10776, "stable_id": "charleston_2026_reciprocity_sprint_04", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 146 |
+
{"task": "smallmath-10785", "problem_id": 10785, "stable_id": "csaml_2026_state_1_3", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 147 |
+
{"task": "smallmath-10828", "problem_id": 10828, "stable_id": "csaml_2026_arml_qualifier_23", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 148 |
+
{"task": "smallmath-10836", "problem_id": 10836, "stable_id": "csaml_2026_arml_tst1_06", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 149 |
+
{"task": "smallmath-1086", "problem_id": 1086, "stable_id": "hk_primary_elite_2026_calculation_05", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 150 |
+
{"task": "smallmath-10865", "problem_id": 10865, "stable_id": "montenegro_oz_2026_s2_03", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 151 |
+
{"task": "smallmath-10871", "problem_id": 10871, "stable_id": "montenegro_state_2026_g6_03", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 152 |
+
{"task": "smallmath-10879", "problem_id": 10879, "stable_id": "fcml_2026_match4_1_3", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 153 |
+
{"task": "smallmath-10913", "problem_id": 10913, "stable_id": "north_macedonia_2026_primary_municipal_g7_03", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 154 |
+
{"task": "smallmath-10925", "problem_id": 10925, "stable_id": "puerto_rico_ompr_2026_firstphase_level3_12", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 155 |
+
{"task": "smallmath-10995", "problem_id": 10995, "stable_id": "fcml_2026_match6_6_1", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 156 |
+
{"task": "smallmath-11012", "problem_id": 11012, "stable_id": "fcml_2026_match1_3_3", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 157 |
+
{"task": "smallmath-11017", "problem_id": 11017, "stable_id": "fcml_2026_match1_5_3", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 158 |
+
{"task": "smallmath-11100", "problem_id": 11100, "stable_id": "north_macedonia_2026_secondary_national_s1_04", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 159 |
+
{"task": "smallmath-11107", "problem_id": 11107, "stable_id": "north_macedonia_2026_mmo_05", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 160 |
+
{"task": "smallmath-11129", "problem_id": 11129, "stable_id": "brazil_campinense_2026_level3_02", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 161 |
+
{"task": "smallmath-11164", "problem_id": 11164, "stable_id": "north_macedonia_2026_jmmo_04", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 162 |
+
{"task": "smallmath-11165", "problem_id": 11165, "stable_id": "north_macedonia_2026_imo_selection_01", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 163 |
+
{"task": "smallmath-11168", "problem_id": 11168, "stable_id": "north_macedonia_2026_jbmo_selection_02", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 164 |
+
{"task": "smallmath-11179", "problem_id": 11179, "stable_id": "komal_2026_may_b5540", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 165 |
+
{"task": "smallmath-11247", "problem_id": 11247, "stable_id": "brazil_omrn_2026_phase1_level3_11", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 166 |
+
{"task": "smallmath-11268", "problem_id": 11268, "stable_id": "vargatamas_2026_final_g8_cat2_05", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 167 |
+
{"task": "smallmath-11340", "problem_id": 11340, "stable_id": "serbia_2026_senior_smo_04", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 168 |
+
{"task": "smallmath-11357", "problem_id": 11357, "stable_id": "brazil_omifce_2026_phase1_level2_17", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 169 |
+
{"task": "smallmath-1136", "problem_id": 1136, "stable_id": "jacob_palis_2026_l3_13", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 170 |
+
{"task": "smallmath-11408", "problem_id": 11408, "stable_id": "serbia_2026_secondary_municipal_b2_02", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 171 |
+
{"task": "smallmath-11507", "problem_id": 11507, "stable_id": "bolyai_team_2026_regional_g9_07", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 172 |
+
{"task": "smallmath-1154", "problem_id": 1154, "stable_id": "dutch_selection_b_2026_05", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 173 |
+
{"task": "smallmath-11563", "problem_id": 11563, "stable_id": "brazil_oprm_2026_phase1_level1_16", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 174 |
+
{"task": "smallmath-1157", "problem_id": 1157, "stable_id": "dutch_selection_d_2026_01", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 175 |
+
{"task": "smallmath-1159", "problem_id": 1159, "stable_id": "dutch_selection_d_2026_03", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 176 |
+
{"task": "smallmath-11606", "problem_id": 11606, "stable_id": "brazil_oprm_2026_phase2_level1_01b", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 177 |
+
{"task": "smallmath-11625", "problem_id": 11625, "stable_id": "brazil_oprm_2026_phase2_level2_03b", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 178 |
+
{"task": "smallmath-1163", "problem_id": 1163, "stable_id": "dutch_selection_e_2026_04", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 179 |
+
{"task": "smallmath-11648", "problem_id": 11648, "stable_id": "brazil_oprm_2026_phase2_level3_05c", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 180 |
+
{"task": "smallmath-1169", "problem_id": 1169, "stable_id": "moscow_grade11_day1_2026_03", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 181 |
+
{"task": "smallmath-1171", "problem_id": 1171, "stable_id": "mongolia_school_2026_c_01", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 182 |
+
{"task": "smallmath-11712", "problem_id": 11712, "stable_id": "hungary_kalmar_2026_regional_g7_03", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 183 |
+
{"task": "smallmath-11729", "problem_id": 11729, "stable_id": "rmm_2026_01", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 184 |
+
{"task": "smallmath-11730", "problem_id": 11730, "stable_id": "vietnam_tst_2026_02", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 185 |
+
{"task": "smallmath-11731", "problem_id": 11731, "stable_id": "china_tst_2026_05", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 186 |
+
{"task": "smallmath-11733", "problem_id": 11733, "stable_id": "china_tst_2026_14", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 187 |
+
{"task": "smallmath-11739", "problem_id": 11739, "stable_id": "hmmt_nov_2026_gen_06", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 188 |
+
{"task": "smallmath-11740", "problem_id": 11740, "stable_id": "hmmt_nov_2026_gen_07", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 189 |
+
{"task": "smallmath-11741", "problem_id": 11741, "stable_id": "hmmt_nov_2026_gen_08", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 190 |
+
{"task": "smallmath-11742", "problem_id": 11742, "stable_id": "hmmt_nov_2026_gen_09", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 191 |
+
{"task": "smallmath-11757", "problem_id": 11757, "stable_id": "hmmt_nov_2026_team_04", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 192 |
+
{"task": "smallmath-11761", "problem_id": 11761, "stable_id": "hmmt_nov_2026_team_08", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 193 |
+
{"task": "smallmath-11762", "problem_id": 11762, "stable_id": "hmmt_nov_2026_team_09", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 194 |
+
{"task": "smallmath-11763", "problem_id": 11763, "stable_id": "hmmt_nov_2026_team_10", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 195 |
+
{"task": "smallmath-11772", "problem_id": 11772, "stable_id": "hmmt_nov_2026_guts_09", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 196 |
+
{"task": "smallmath-11777", "problem_id": 11777, "stable_id": "hmmt_nov_2026_guts_14", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 197 |
+
{"task": "smallmath-11783", "problem_id": 11783, "stable_id": "hmmt_nov_2026_guts_20", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 198 |
+
{"task": "smallmath-11786", "problem_id": 11786, "stable_id": "hmmt_nov_2026_guts_23", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 199 |
+
{"task": "smallmath-11788", "problem_id": 11788, "stable_id": "hmmt_nov_2026_guts_25", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 200 |
+
{"task": "smallmath-11792", "problem_id": 11792, "stable_id": "hmmt_nov_2026_guts_29", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 201 |
+
{"task": "smallmath-11794", "problem_id": 11794, "stable_id": "hmmt_nov_2026_guts_31", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 202 |
+
{"task": "smallmath-11795", "problem_id": 11795, "stable_id": "hmmt_nov_2026_guts_32", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 203 |
+
{"task": "smallmath-1190", "problem_id": 1190, "stable_id": "mongolia_school_2026_d_10", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 204 |
+
{"task": "smallmath-1202", "problem_id": 1202, "stable_id": "mongolia_school_2026_e_12", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 205 |
+
{"task": "smallmath-1209", "problem_id": 1209, "stable_id": "mongolia_school_2026_f_07", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 206 |
+
{"task": "smallmath-1220", "problem_id": 1220, "stable_id": "mongolia_regional_2026_e_02", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 207 |
+
{"task": "smallmath-1225", "problem_id": 1225, "stable_id": "mongolia_national_2026_e_01", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 208 |
+
{"task": "smallmath-1454", "problem_id": 1454, "stable_id": "mathcounts_2026_state_countdown_50", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 209 |
+
{"task": "smallmath-1520", "problem_id": 1520, "stable_id": "brumo_2026_team_a_09", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 210 |
+
{"task": "smallmath-1531", "problem_id": 1531, "stable_id": "brumo_2026_team_b_10", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 211 |
+
{"task": "smallmath-1535", "problem_id": 1535, "stable_id": "brumo_2026_redpoint_04", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 212 |
+
{"task": "smallmath-1583", "problem_id": 1583, "stable_id": "brumo_2026_guts_32", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 213 |
+
{"task": "smallmath-1599", "problem_id": 1599, "stable_id": "cmm_2026_team_4", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 214 |
+
{"task": "smallmath-1612", "problem_id": 1612, "stable_id": "cmm_2026_bee_qualifying_2", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 215 |
+
{"task": "smallmath-1613", "problem_id": 1613, "stable_id": "cmm_2026_bee_qualifying_4", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 216 |
+
{"task": "smallmath-1615", "problem_id": 1615, "stable_id": "cmm_2026_bee_qualifying_9", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 217 |
+
{"task": "smallmath-1619", "problem_id": 1619, "stable_id": "cmm_2026_bee_finals_5", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 218 |
+
{"task": "smallmath-1620", "problem_id": 1620, "stable_id": "cmm_2026_bee_finals_6", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 219 |
+
{"task": "smallmath-1636", "problem_id": 1636, "stable_id": "cmm_2026_bee_finals_33", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 220 |
+
{"task": "smallmath-1642", "problem_id": 1642, "stable_id": "cmm_2026_bee_finals_50", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 221 |
+
{"task": "smallmath-1648", "problem_id": 1648, "stable_id": "russia_vsosh_final_grade9_2026_01", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 222 |
+
{"task": "smallmath-1655", "problem_id": 1655, "stable_id": "russia_vsosh_final_grade10_2026_04", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 223 |
+
{"task": "smallmath-1658", "problem_id": 1658, "stable_id": "russia_vsosh_final_grade11_2026_04", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 224 |
+
{"task": "smallmath-1661", "problem_id": 1661, "stable_id": "russia_vsosh_final_grade11_2026_08", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 225 |
+
{"task": "smallmath-1667", "problem_id": 1667, "stable_id": "romania_onm_grade6_2026_03", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 226 |
+
{"task": "smallmath-1688", "problem_id": 1688, "stable_id": "romania_junior_selection3_2026_03", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 227 |
+
{"task": "smallmath-1694", "problem_id": 1694, "stable_id": "ukmcg_2026_02", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 228 |
+
{"task": "smallmath-1696", "problem_id": 1696, "stable_id": "ukmog_2026_03", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 229 |
+
{"task": "smallmath-1697", "problem_id": 1697, "stable_id": "ukmcg_2026_05", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 230 |
+
{"task": "smallmath-1701", "problem_id": 1701, "stable_id": "kazakhstan_national_2026_g9_03", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 231 |
+
{"task": "smallmath-1705", "problem_id": 1705, "stable_id": "kazakhstan_national_2026_g10_03", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 232 |
+
{"task": "smallmath-1708", "problem_id": 1708, "stable_id": "imc_university_2026_03", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 233 |
+
{"task": "smallmath-1731", "problem_id": 1731, "stable_id": "bdmo_2026_1_secondary_07", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 234 |
+
{"task": "smallmath-1734", "problem_id": 1734, "stable_id": "bdmo_2026_1_higher_secondary_04", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 235 |
+
{"task": "smallmath-1756", "problem_id": 1756, "stable_id": "bdmo_2026_2_higher_secondary_01", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 236 |
+
{"task": "smallmath-1841", "problem_id": 1841, "stable_id": "bdmo_2026_6_junior_07", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 237 |
+
{"task": "smallmath-1873", "problem_id": 1873, "stable_id": "bdmo_2026_7_secondary_06", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 238 |
+
{"task": "smallmath-1875", "problem_id": 1875, "stable_id": "bdmo_2026_7_higher_secondary_01", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 239 |
+
{"task": "smallmath-1919", "problem_id": 1919, "stable_id": "clmc_2026_c_04", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 240 |
+
{"task": "smallmath-1920", "problem_id": 1920, "stable_id": "clmc_2026_c_05", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 241 |
+
{"task": "smallmath-1929", "problem_id": 1929, "stable_id": "comc_2026_c1c", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 242 |
+
{"task": "smallmath-1949", "problem_id": 1949, "stable_id": "amc8_2026_16", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 243 |
+
{"task": "smallmath-1966", "problem_id": 1966, "stable_id": "peru_preigo_2026_elemental_08", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 244 |
+
{"task": "smallmath-1986", "problem_id": 1986, "stable_id": "peru_preigo_2026_avanzado_08", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 245 |
+
{"task": "smallmath-1988", "problem_id": 1988, "stable_id": "peru_preigo_2026_avanzado_10", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 246 |
+
{"task": "smallmath-2036", "problem_id": 2036, "stable_id": "turkey_national_middle_stage1_2026_16", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 247 |
+
{"task": "smallmath-2119", "problem_id": 2119, "stable_id": "kyrgyzstan_national_2026_senior2_20", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 248 |
+
{"task": "smallmath-2125", "problem_id": 2125, "stable_id": "kmo_2026_first_middle_04", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 249 |
+
{"task": "smallmath-2131", "problem_id": 2131, "stable_id": "kmo_2026_first_middle_10", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 250 |
+
{"task": "smallmath-2134", "problem_id": 2134, "stable_id": "kmo_2026_first_middle_13", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 251 |
+
{"task": "smallmath-2138", "problem_id": 2138, "stable_id": "kmo_2026_first_middle_17", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 252 |
+
{"task": "smallmath-2141", "problem_id": 2141, "stable_id": "kmo_2026_first_middle_20", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 253 |
+
{"task": "smallmath-2154", "problem_id": 2154, "stable_id": "kmo_2026_first_high_13", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 254 |
+
{"task": "smallmath-2160", "problem_id": 2160, "stable_id": "kmo_2026_first_high_19", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 255 |
+
{"task": "smallmath-2161", "problem_id": 2161, "stable_id": "kmo_2026_first_high_20", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 256 |
+
{"task": "smallmath-2165", "problem_id": 2165, "stable_id": "kjmo_2026_04", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 257 |
+
{"task": "smallmath-2171", "problem_id": 2171, "stable_id": "kjmo_2026_10", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 258 |
+
{"task": "smallmath-2178", "problem_id": 2178, "stable_id": "kjmo_2026_17", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 259 |
+
{"task": "smallmath-2180", "problem_id": 2180, "stable_id": "kjmo_2026_19", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 260 |
+
{"task": "smallmath-2186", "problem_id": 2186, "stable_id": "serbia_imo_selection_2026_05", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 261 |
+
{"task": "smallmath-2246", "problem_id": 2246, "stable_id": "chantilly_2026_midd_team_11", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 262 |
+
{"task": "smallmath-2292", "problem_id": 2292, "stable_id": "mathchallengers_2026_regional_coop_06", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 263 |
+
{"task": "smallmath-2302", "problem_id": 2302, "stable_id": "umo_2026_03", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 264 |
+
{"task": "smallmath-2315", "problem_id": 2315, "stable_id": "ramc_2026_e1_individual_13", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 265 |
+
{"task": "smallmath-2403", "problem_id": 2403, "stable_id": "croatia_national_a_grade2_2026_04", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 266 |
+
{"task": "smallmath-2409", "problem_id": 2409, "stable_id": "croatia_national_a_grade3_2026_05", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 267 |
+
{"task": "smallmath-2412", "problem_id": 2412, "stable_id": "croatia_national_a_grade4_2026_03", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 268 |
+
{"task": "smallmath-2420", "problem_id": 2420, "stable_id": "croatia_national_b_grade2_2026_01", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 269 |
+
{"task": "smallmath-2451", "problem_id": 2451, "stable_id": "bulgaria_grade8_2026_01", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 270 |
+
{"task": "smallmath-2453", "problem_id": 2453, "stable_id": "bulgaria_grade8_2026_03", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 271 |
+
{"task": "smallmath-2455", "problem_id": 2455, "stable_id": "bulgaria_senior1_2026_02", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 272 |
+
{"task": "smallmath-2460", "problem_id": 2460, "stable_id": "bulgaria_universityb_2026_02", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 273 |
+
{"task": "smallmath-2496", "problem_id": 2496, "stable_id": "imt_2026_number_theory_01", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 274 |
+
{"task": "smallmath-2500", "problem_id": 2500, "stable_id": "imt_2026_number_theory_07", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 275 |
+
{"task": "smallmath-2520", "problem_id": 2520, "stable_id": "imt_2026_geometry_09", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 276 |
+
{"task": "smallmath-2521", "problem_id": 2521, "stable_id": "imt_2026_geometry_10", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 277 |
+
{"task": "smallmath-2523", "problem_id": 2523, "stable_id": "imt_2026_integrated_04a", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 278 |
+
{"task": "smallmath-2534", "problem_id": 2534, "stable_id": "imt_2026_integrated_12a", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 279 |
+
{"task": "smallmath-2540", "problem_id": 2540, "stable_id": "imt_2026_integrated_18b", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 280 |
+
{"task": "smallmath-2545", "problem_id": 2545, "stable_id": "imt_2026_integrated_20d_i", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 281 |
+
{"task": "smallmath-2546", "problem_id": 2546, "stable_id": "imt_2026_integrated_20d_ii", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 282 |
+
{"task": "smallmath-2627", "problem_id": 2627, "stable_id": "ithaca_2026_team_10", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 283 |
+
{"task": "smallmath-2640", "problem_id": 2640, "stable_id": "israel_young_b_grade3_2026_03", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 284 |
+
{"task": "smallmath-2646", "problem_id": 2646, "stable_id": "israel_young_b_grade6_7_2026_03", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 285 |
+
{"task": "smallmath-2651", "problem_id": 2651, "stable_id": "israel_young_f_grade3_2026_01", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 286 |
+
{"task": "smallmath-2720", "problem_id": 2720, "stable_id": "kangaroo_germany_2026_1113_b5", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 287 |
+
{"task": "smallmath-2723", "problem_id": 2723, "stable_id": "kangaroo_germany_2026_1113_b9", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 288 |
+
{"task": "smallmath-2759", "problem_id": 2759, "stable_id": "femssisa_2026_grade4_05", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 289 |
+
{"task": "smallmath-2816", "problem_id": 2816, "stable_id": "und_2026_g78_i1_07", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 290 |
+
{"task": "smallmath-2831", "problem_id": 2831, "stable_id": "und_2026_g78_i4_02", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 291 |
+
{"task": "smallmath-2852", "problem_id": 2852, "stable_id": "und_2026_g78_t2_07", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 292 |
+
{"task": "smallmath-2857", "problem_id": 2857, "stable_id": "und_2026_g910_i1_02", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 293 |
+
{"task": "smallmath-2862", "problem_id": 2862, "stable_id": "und_2026_g910_i1_07", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 294 |
+
{"task": "smallmath-2863", "problem_id": 2863, "stable_id": "und_2026_g910_i2_01", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 295 |
+
{"task": "smallmath-2870", "problem_id": 2870, "stable_id": "und_2026_g910_i3_03", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 296 |
+
{"task": "smallmath-2872", "problem_id": 2872, "stable_id": "und_2026_g910_i3_05", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 297 |
+
{"task": "smallmath-2873", "problem_id": 2873, "stable_id": "und_2026_g910_i3_06", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 298 |
+
{"task": "smallmath-2879", "problem_id": 2879, "stable_id": "und_2026_g910_i4_05", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 299 |
+
{"task": "smallmath-2886", "problem_id": 2886, "stable_id": "und_2026_g910_t1_05", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 300 |
+
{"task": "smallmath-2890", "problem_id": 2890, "stable_id": "und_2026_g910_t1_09", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 301 |
+
{"task": "smallmath-2895", "problem_id": 2895, "stable_id": "und_2026_g910_t2_04", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 302 |
+
{"task": "smallmath-2896", "problem_id": 2896, "stable_id": "und_2026_g910_t2_05", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 303 |
+
{"task": "smallmath-2901", "problem_id": 2901, "stable_id": "und_2026_g910_t2_10", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 304 |
+
{"task": "smallmath-2904", "problem_id": 2904, "stable_id": "und_2026_g1112_i1_03", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 305 |
+
{"task": "smallmath-2912", "problem_id": 2912, "stable_id": "und_2026_g1112_i2_04", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 306 |
+
{"task": "smallmath-2913", "problem_id": 2913, "stable_id": "und_2026_g1112_i2_05", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 307 |
+
{"task": "smallmath-2916", "problem_id": 2916, "stable_id": "und_2026_g1112_i3_01", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 308 |
+
{"task": "smallmath-2923", "problem_id": 2923, "stable_id": "und_2026_g1112_i4_01", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 309 |
+
{"task": "smallmath-2924", "problem_id": 2924, "stable_id": "und_2026_g1112_i4_02", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 310 |
+
{"task": "smallmath-2925", "problem_id": 2925, "stable_id": "und_2026_g1112_i4_03", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 311 |
+
{"task": "smallmath-2927", "problem_id": 2927, "stable_id": "und_2026_g1112_i4_05", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 312 |
+
{"task": "smallmath-2930", "problem_id": 2930, "stable_id": "und_2026_g1112_t1_01", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 313 |
+
{"task": "smallmath-2933", "problem_id": 2933, "stable_id": "und_2026_g1112_t1_04", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 314 |
+
{"task": "smallmath-2935", "problem_id": 2935, "stable_id": "und_2026_g1112_t1_07", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 315 |
+
{"task": "smallmath-2939", "problem_id": 2939, "stable_id": "und_2026_g1112_t2_02", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 316 |
+
{"task": "smallmath-2944", "problem_id": 2944, "stable_id": "und_2026_g1112_t2_07", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 317 |
+
{"task": "smallmath-3047", "problem_id": 3047, "stable_id": "hkmkc_2026_pre_ecolier_25", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 318 |
+
{"task": "smallmath-3091", "problem_id": 3091, "stable_id": "croatia_regional_a_grade2_2026_05", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 319 |
+
{"task": "smallmath-3118", "problem_id": 3118, "stable_id": "croatia_school_b_grade3_2026_04", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 320 |
+
{"task": "smallmath-3239", "problem_id": 3239, "stable_id": "croatia_school_a_grade1_2026_07", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 321 |
+
{"task": "smallmath-3297", "problem_id": 3297, "stable_id": "alabama_2026_algebra_31", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 322 |
+
{"task": "smallmath-3301", "problem_id": 3301, "stable_id": "alabama_2026_algebra_35", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 323 |
+
{"task": "smallmath-3337", "problem_id": 3337, "stable_id": "alabama_2026_geometry_03", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 324 |
+
{"task": "smallmath-3341", "problem_id": 3341, "stable_id": "alabama_2026_geometry_07", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 325 |
+
{"task": "smallmath-3345", "problem_id": 3345, "stable_id": "alabama_2026_geometry_11", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 326 |
+
{"task": "smallmath-3358", "problem_id": 3358, "stable_id": "alabama_2026_geometry_24", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 327 |
+
{"task": "smallmath-3360", "problem_id": 3360, "stable_id": "alabama_2026_geometry_26", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 328 |
+
{"task": "smallmath-3364", "problem_id": 3364, "stable_id": "alabama_2026_geometry_30", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 329 |
+
{"task": "smallmath-3384", "problem_id": 3384, "stable_id": "caps_2026_01", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 330 |
+
{"task": "smallmath-3409", "problem_id": 3409, "stable_id": "slovakia_regional_c_2026_02", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 331 |
+
{"task": "smallmath-3415", "problem_id": 3415, "stable_id": "slovakia_2026_z6_district_01", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 332 |
+
{"task": "smallmath-3421", "problem_id": 3421, "stable_id": "slovakia_2026_z8_district_01", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 333 |
+
{"task": "smallmath-3428", "problem_id": 3428, "stable_id": "slovakia_2026_z9_regional_01", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 334 |
+
{"task": "smallmath-3462", "problem_id": 3462, "stable_id": "kangourou_italia_2026_semifinal_cadet_18", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 335 |
+
{"task": "smallmath-3508", "problem_id": 3508, "stable_id": "houston_2026_calculus_12", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 336 |
+
{"task": "smallmath-3521", "problem_id": 3521, "stable_id": "houston_2026_calculus_26", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 337 |
+
{"task": "smallmath-3524", "problem_id": 3524, "stable_id": "houston_2026_calculus_29", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 338 |
+
{"task": "smallmath-3548", "problem_id": 3548, "stable_id": "portugal_2026_mini_4ano_02", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 339 |
+
{"task": "smallmath-3596", "problem_id": 3596, "stable_id": "houston_2026_precalculus_02", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 340 |
+
{"task": "smallmath-3599", "problem_id": 3599, "stable_id": "houston_2026_precalculus_08", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 341 |
+
{"task": "smallmath-3603", "problem_id": 3603, "stable_id": "houston_2026_precalculus_12", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 342 |
+
{"task": "smallmath-3618", "problem_id": 3618, "stable_id": "houston_2026_precalculus_30", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 343 |
+
{"task": "smallmath-3621", "problem_id": 3621, "stable_id": "houston_2026_precalculus_33", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 344 |
+
{"task": "smallmath-3663", "problem_id": 3663, "stable_id": "kangourou_italy_team_benjamin_2026_r1_01", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 345 |
+
{"task": "smallmath-3692", "problem_id": 3692, "stable_id": "georgmohr_2026_second_01", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 346 |
+
{"task": "smallmath-3750", "problem_id": 3750, "stable_id": "kangourou_italy_team_cadet_2026_r2_13", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 347 |
+
{"task": "smallmath-3768", "problem_id": 3768, "stable_id": "portugal_2026_final_a_3", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 348 |
+
{"task": "smallmath-3786", "problem_id": 3786, "stable_id": "kangourou_italy_team_junior_2026_r1_12", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 349 |
+
{"task": "smallmath-3789", "problem_id": 3789, "stable_id": "kangourou_italy_team_junior_2026_r1_15", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 350 |
+
{"task": "smallmath-3801", "problem_id": 3801, "stable_id": "kangourou_italy_team_junior_2026_r2_12", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 351 |
+
{"task": "smallmath-3811", "problem_id": 3811, "stable_id": "houston_2026_statistics_10", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 352 |
+
{"task": "smallmath-3815", "problem_id": 3815, "stable_id": "houston_2026_statistics_31", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 353 |
+
{"task": "smallmath-3823", "problem_id": 3823, "stable_id": "hmt_sweden_2026_final_05", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 354 |
+
{"task": "smallmath-3827", "problem_id": 3827, "stable_id": "smt_sweden_2026_qualification_03", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 355 |
+
{"task": "smallmath-3858", "problem_id": 3858, "stable_id": "finland_grade7_2026_helsinki_final_01a", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 356 |
+
{"task": "smallmath-3859", "problem_id": 3859, "stable_id": "finland_grade7_2026_helsinki_final_01b", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 357 |
+
{"task": "smallmath-3881", "problem_id": 3881, "stable_id": "kangourou_france_2026_b_26", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 358 |
+
{"task": "smallmath-3889", "problem_id": 3889, "stable_id": "abel_2026_second_01", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 359 |
+
{"task": "smallmath-3955", "problem_id": 3955, "stable_id": "slovenia_2026_regional_grade9_a5", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 360 |
+
{"task": "smallmath-3978", "problem_id": 3978, "stable_id": "abel_2026_final_2b", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 361 |
+
{"task": "smallmath-3982", "problem_id": 3982, "stable_id": "iceland_2026_final_05", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 362 |
+
{"task": "smallmath-4007", "problem_id": 4007, "stable_id": "finland_matcup_2026_qualifier2_07", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 363 |
+
{"task": "smallmath-4011", "problem_id": 4011, "stable_id": "spain_ome_2026_madrid_phasezero_04", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 364 |
+
{"task": "smallmath-4034", "problem_id": 4034, "stable_id": "emo_2026_06", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 365 |
+
{"task": "smallmath-4066", "problem_id": 4066, "stable_id": "uct_2026_grade9_07", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 366 |
+
{"task": "smallmath-4142", "problem_id": 4142, "stable_id": "vilnius_university_2026_02", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 367 |
+
{"task": "smallmath-4144", "problem_id": 4144, "stable_id": "canada_repechage_2026_04", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 368 |
+
{"task": "smallmath-4201", "problem_id": 4201, "stable_id": "jarnik_2026_cat2_01", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 369 |
+
{"task": "smallmath-4206", "problem_id": 4206, "stable_id": "estonia_2026_open_junior_03", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 370 |
+
{"task": "smallmath-4217", "problem_id": 4217, "stable_id": "spain_guadalajara_2026_junior_school_03", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 371 |
+
{"task": "smallmath-4220", "problem_id": 4220, "stable_id": "spain_guadalajara_2026_juvenil_school_02", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 372 |
+
{"task": "smallmath-4227", "problem_id": 4227, "stable_id": "spain_guadalajara_2026_ome_local_04", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 373 |
+
{"task": "smallmath-4228", "problem_id": 4228, "stable_id": "spain_ofem_2026_01", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 374 |
+
{"task": "smallmath-4230", "problem_id": 4230, "stable_id": "latvia_2026_final_grade10_04", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 375 |
+
{"task": "smallmath-4260", "problem_id": 4260, "stable_id": "latvia_2026_regional_grade12_04", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 376 |
+
{"task": "smallmath-4272", "problem_id": 4272, "stable_id": "latvia_2026_regional_grade8_03", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 377 |
+
{"task": "smallmath-4273", "problem_id": 4273, "stable_id": "latvia_2026_regional_grade8_04", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 378 |
+
{"task": "smallmath-4300", "problem_id": 4300, "stable_id": "spain_murcia_2026_comarcal_eso_01a1", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 379 |
+
{"task": "smallmath-4305", "problem_id": 4305, "stable_id": "spain_murcia_2026_comarcal_eso_03", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 380 |
+
{"task": "smallmath-4311", "problem_id": 4311, "stable_id": "spain_murcia_2026_regional_eso_02a", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 381 |
+
{"task": "smallmath-4328", "problem_id": 4328, "stable_id": "latvia_tvc_2026_round4_07", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 382 |
+
{"task": "smallmath-4366", "problem_id": 4366, "stable_id": "spain_thales_2026_regional_juvenil_p03", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 383 |
+
{"task": "smallmath-4368", "problem_id": 4368, "stable_id": "spain_thales_2026_regional_juvenil_p06", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 384 |
+
{"task": "smallmath-4374", "problem_id": 4374, "stable_id": "towns_2026_autumn_junior_a_05", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 385 |
+
{"task": "smallmath-4386", "problem_id": 4386, "stable_id": "spain_thales_junior_2026_provincial_04", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 386 |
+
{"task": "smallmath-4398", "problem_id": 4398, "stable_id": "spain_galicia_junior_2026_final_01", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 387 |
+
{"task": "smallmath-4405", "problem_id": 4405, "stable_id": "estonia_2026_regional_g7_part2_03", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 388 |
+
{"task": "smallmath-4406", "problem_id": 4406, "stable_id": "estonia_2026_regional_g7_part2_04", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 389 |
+
{"task": "smallmath-4409", "problem_id": 4409, "stable_id": "estonia_2026_regional_g8_part2_03", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 390 |
+
{"task": "smallmath-4412", "problem_id": 4412, "stable_id": "estonia_2026_regional_g9_part2_01", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 391 |
+
{"task": "smallmath-4432", "problem_id": 4432, "stable_id": "towns_2026_spring_advanced_junior_07", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 392 |
+
{"task": "smallmath-4442", "problem_id": 4442, "stable_id": "towns_2026_spring_ordinary_senior_05", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 393 |
+
{"task": "smallmath-4476", "problem_id": 4476, "stable_id": "spain_thales_2026_granada_primary_team_06", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 394 |
+
{"task": "smallmath-4516", "problem_id": 4516, "stable_id": "mexico_invitation_2026_l4_01", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 395 |
+
{"task": "smallmath-4538", "problem_id": 4538, "stable_id": "nandu_2026_zonal_l1_01", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 396 |
+
{"task": "smallmath-4607", "problem_id": 4607, "stable_id": "estonia_2026_nuputa_g7_07", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 397 |
+
{"task": "smallmath-4618", "problem_id": 4618, "stable_id": "umd_2026_part1_02", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 398 |
+
{"task": "smallmath-4665", "problem_id": 4665, "stable_id": "mateclubes_2026_r1_l3_01", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 399 |
+
{"task": "smallmath-4673", "problem_id": 4673, "stable_id": "mateclubes_2026_r1_l5_03", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 400 |
+
{"task": "smallmath-4715", "problem_id": 4715, "stable_id": "lehigh_2026_24", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 401 |
+
{"task": "smallmath-4737", "problem_id": 4737, "stable_id": "spain_copa_cangur_2026_junior_final_01", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 402 |
+
{"task": "smallmath-4749", "problem_id": 4749, "stable_id": "spain_copa_cangur_2026_junior_final_13", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 403 |
+
{"task": "smallmath-4763", "problem_id": 4763, "stable_id": "lithuania_2026_national_s03", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 404 |
+
{"task": "smallmath-4766", "problem_id": 4766, "stable_id": "lithuania_2026_selection_05", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 405 |
+
{"task": "smallmath-4769", "problem_id": 4769, "stable_id": "mexico_cnf_2026_level1_02", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 406 |
+
{"task": "smallmath-4770", "problem_id": 4770, "stable_id": "mexico_cnf_2026_level1_03", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 407 |
+
{"task": "smallmath-4778", "problem_id": 4778, "stable_id": "melbourne_2026_junior_04", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 408 |
+
{"task": "smallmath-4788", "problem_id": 4788, "stable_id": "melbourne_2026_senior_07", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 409 |
+
{"task": "smallmath-4795", "problem_id": 4795, "stable_id": "southampton_2026_junior_08_c", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 410 |
+
{"task": "smallmath-4796", "problem_id": 4796, "stable_id": "southampton_2026_senior_01", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 411 |
+
{"task": "smallmath-4807", "problem_id": 4807, "stable_id": "lithuania_2026_junior_g56_06", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 412 |
+
{"task": "smallmath-4820", "problem_id": 4820, "stable_id": "lithuania_2026_team_14", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 413 |
+
{"task": "smallmath-4825", "problem_id": 4825, "stable_id": "mexico_yucatan_2026_school_02", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 414 |
+
{"task": "smallmath-4881", "problem_id": 4881, "stable_id": "spain_primavera_2026_phase1_level3_11", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 415 |
+
{"task": "smallmath-4946", "problem_id": 4946, "stable_id": "mexico_ommeb_2026_individual_level3_14", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 416 |
+
{"task": "smallmath-5055", "problem_id": 5055, "stable_id": "spain_primavera_2026_phase2_level4_11", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 417 |
+
{"task": "smallmath-5075", "problem_id": 5075, "stable_id": "bulgaria_2026_winter_9_4", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 418 |
+
{"task": "smallmath-5085", "problem_id": 5085, "stable_id": "ecuador_2026_egmo_02", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 419 |
+
{"task": "smallmath-5098", "problem_id": 5098, "stable_id": "ecuador_2026_cono2_06", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 420 |
+
{"task": "smallmath-5103", "problem_id": 5103, "stable_id": "mexico_guanajuato_girls_final_2026_02", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 421 |
+
{"task": "smallmath-5116", "problem_id": 5116, "stable_id": "spain_intercentros_2026_relay_level2_a", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 422 |
+
{"task": "smallmath-5137", "problem_id": 5137, "stable_id": "moldova_2026_national_g7_07", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 423 |
+
{"task": "smallmath-5175", "problem_id": 5175, "stable_id": "spain_esprint_2026_bach_08", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 424 |
+
{"task": "smallmath-5204", "problem_id": 5204, "stable_id": "hungary_2026_selection4_06", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 425 |
+
{"task": "smallmath-5212", "problem_id": 5212, "stable_id": "paraguay_2026_juvenile_final_2_05", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 426 |
+
{"task": "smallmath-5216", "problem_id": 5216, "stable_id": "paraguay_2026_juvenile_final_3_04", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 427 |
+
{"task": "smallmath-5235", "problem_id": 5235, "stable_id": "paraguay_2026_primary_final_5_02", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 428 |
+
{"task": "smallmath-5286", "problem_id": 5286, "stable_id": "lithuania_lpmo_2026_national_g4_10", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 429 |
+
{"task": "smallmath-5289", "problem_id": 5289, "stable_id": "paraguay_2026_juvenile_department_1_01", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 430 |
+
{"task": "smallmath-5336", "problem_id": 5336, "stable_id": "belgium_jwo_2026_r1_25", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 431 |
+
{"task": "smallmath-5343", "problem_id": 5343, "stable_id": "bolivia_opmat_2026_gamma_final_03", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 432 |
+
{"task": "smallmath-5382", "problem_id": 5382, "stable_id": "armenia_young_2026_g5_01", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 433 |
+
{"task": "smallmath-5395", "problem_id": 5395, "stable_id": "armenia_2026_national_g8_05", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 434 |
+
{"task": "smallmath-5400", "problem_id": 5400, "stable_id": "bolivia_opmat_2026_epsilon_phase2_01", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 435 |
+
{"task": "smallmath-5453", "problem_id": 5453, "stable_id": "belgium_vwo_2026_r1_21", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 436 |
+
{"task": "smallmath-5514", "problem_id": 5514, "stable_id": "armenia_2026_regional_g7_03", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 437 |
+
{"task": "smallmath-5588", "problem_id": 5588, "stable_id": "greece_little_euclid_2026_grade6_09", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 438 |
+
{"task": "smallmath-5618", "problem_id": 5618, "stable_id": "greece_euclid_2026_grade9_04", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 439 |
+
{"task": "smallmath-5645", "problem_id": 5645, "stable_id": "greece_archimedes_2026_junior_01", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 440 |
+
{"task": "smallmath-5682", "problem_id": 5682, "stable_id": "greece_thales_2026_grade10_01", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 441 |
+
{"task": "smallmath-5687", "problem_id": 5687, "stable_id": "greece_thales_2026_grade12_01", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 442 |
+
{"task": "smallmath-5707", "problem_id": 5707, "stable_id": "india_nmtc_2026_junior_screening_18", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 443 |
+
{"task": "smallmath-5794", "problem_id": 5794, "stable_id": "algeria_2026_first_m34_09", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 444 |
+
{"task": "smallmath-5883", "problem_id": 5883, "stable_id": "morocco_mmc_university_2026_02", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 445 |
+
{"task": "smallmath-5891", "problem_id": 5891, "stable_id": "cyprus_olympiad_2026_grades11_12_07", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 446 |
+
{"task": "smallmath-5908", "problem_id": 5908, "stable_id": "morocco_mmc_junior_dm_2026_iii1a", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 447 |
+
{"task": "smallmath-5912", "problem_id": 5912, "stable_id": "peru_onem_2026_national_level2_01", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 448 |
+
{"task": "smallmath-5916", "problem_id": 5916, "stable_id": "vietnam_vms_2026_youth_pt_06", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 449 |
+
{"task": "smallmath-5928", "problem_id": 5928, "stable_id": "ffjm_2026_semifinal_11", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 450 |
+
{"task": "smallmath-5931", "problem_id": 5931, "stable_id": "ffjm_2026_semifinal_14", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 451 |
+
{"task": "smallmath-5934", "problem_id": 5934, "stable_id": "ffjm_2026_semifinal_17", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 452 |
+
{"task": "smallmath-6013", "problem_id": 6013, "stable_id": "ffjm_2026_national_11", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 453 |
+
{"task": "smallmath-6018", "problem_id": 6018, "stable_id": "ffjm_2026_national_16", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 454 |
+
{"task": "smallmath-6020", "problem_id": 6020, "stable_id": "ffjm_2026_national_18", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 455 |
+
{"task": "smallmath-6042", "problem_id": 6042, "stable_id": "singapore_smo_2026_senior_r1_22", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 456 |
+
{"task": "smallmath-6048", "problem_id": 6048, "stable_id": "ffjm_2026_international1_03", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 457 |
+
{"task": "smallmath-6052", "problem_id": 6052, "stable_id": "ffjm_2026_international1_07", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 458 |
+
{"task": "smallmath-6056", "problem_id": 6056, "stable_id": "ffjm_2026_international1_11", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 459 |
+
{"task": "smallmath-6109", "problem_id": 6109, "stable_id": "ffjm_2026_international2_16", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 460 |
+
{"task": "smallmath-6158", "problem_id": 6158, "stable_id": "peru_onem_2026_ugel_level2_09", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 461 |
+
{"task": "smallmath-6172", "problem_id": 6172, "stable_id": "bulgaria_2026_regional_grade9_04", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 462 |
+
{"task": "smallmath-6175", "problem_id": 6175, "stable_id": "bulgaria_2026_regional_grade10_04", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 463 |
+
{"task": "smallmath-6217", "problem_id": 6217, "stable_id": "peru_conemate_2026_institutional_secondary_04", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 464 |
+
{"task": "smallmath-6242", "problem_id": 6242, "stable_id": "bulgaria_2026_spring_grade6_01", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 465 |
+
{"task": "smallmath-6295", "problem_id": 6295, "stable_id": "germany_mo_2026_school66_660614", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 466 |
+
{"task": "smallmath-6343", "problem_id": 6343, "stable_id": "indonesia_osnk_2026_sd_11", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 467 |
+
{"task": "smallmath-6359", "problem_id": 6359, "stable_id": "bulgaria_2026_spring_grade9_01_b", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 468 |
+
{"task": "smallmath-6422", "problem_id": 6422, "stable_id": "peru_conemate_2026_national_secondary_16", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 469 |
+
{"task": "smallmath-6456", "problem_id": 6456, "stable_id": "thailand_posn_2026_camp1_30", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 470 |
+
{"task": "smallmath-6459", "problem_id": 6459, "stable_id": "thailand_ijso_2026_round1_math_03", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 471 |
+
{"task": "smallmath-6484", "problem_id": 6484, "stable_id": "germany_mo_2026_landes65_650735", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 472 |
+
{"task": "smallmath-6488", "problem_id": 6488, "stable_id": "germany_mo_2026_landes65_650833", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 473 |
+
{"task": "smallmath-6494", "problem_id": 6494, "stable_id": "germany_mo_2026_landes65_650935", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 474 |
+
{"task": "smallmath-6496", "problem_id": 6496, "stable_id": "germany_mo_2026_landes65_650936_b", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 475 |
+
{"task": "smallmath-6563", "problem_id": 6563, "stable_id": "thailand_association_2026_middle_11", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 476 |
+
{"task": "smallmath-6600", "problem_id": 6600, "stable_id": "mobile_2026_high_05", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 477 |
+
{"task": "smallmath-6604", "problem_id": 6604, "stable_id": "usamts_2026_y38_r1_02", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 478 |
+
{"task": "smallmath-6605", "problem_id": 6605, "stable_id": "france_national_2026_1_1", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 479 |
+
{"task": "smallmath-6606", "problem_id": 6606, "stable_id": "france_national_2026_1_2_q2", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 480 |
+
{"task": "smallmath-6608", "problem_id": 6608, "stable_id": "france_national_2026_1_6_q3", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 481 |
+
{"task": "smallmath-6632", "problem_id": 6632, "stable_id": "peru_bertolt_brecht_2026_secondary1_11", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 482 |
+
{"task": "smallmath-6753", "problem_id": 6753, "stable_id": "tmt_2026_team_06", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 483 |
+
{"task": "smallmath-6786", "problem_id": 6786, "stable_id": "peru_cmb_2026_institutional_2s_3s_06", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 484 |
+
{"task": "smallmath-6796", "problem_id": 6796, "stable_id": "peru_cmb_2026_institutional_4s_5s_12", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 485 |
+
{"task": "smallmath-6803", "problem_id": 6803, "stable_id": "germany_berlin_tdm_2026_g910_04", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 486 |
+
{"task": "smallmath-6883", "problem_id": 6883, "stable_id": "germany_zfm_tdm_2026_s_05", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 487 |
+
{"task": "smallmath-6890", "problem_id": 6890, "stable_id": "peru_cmb_2026_final_3p_a3", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 488 |
+
{"task": "smallmath-6915", "problem_id": 6915, "stable_id": "peru_cmb_2026_final_6p_1s_a6", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 489 |
+
{"task": "smallmath-6944", "problem_id": 6944, "stable_id": "peru_cmb_2026_final_4s_5s_b2", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 490 |
+
{"task": "smallmath-7085", "problem_id": 7085, "stable_id": "france_pofm_2026_test5_06", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 491 |
+
{"task": "smallmath-7337", "problem_id": 7337, "stable_id": "lexington_2026_spring_team_11", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 492 |
+
{"task": "smallmath-7537", "problem_id": 7537, "stable_id": "lexington_2026_spring_guts_25", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 493 |
+
{"task": "smallmath-7543", "problem_id": 7543, "stable_id": "lexington_2026_spring_guts_34", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 494 |
+
{"task": "smallmath-7593", "problem_id": 7593, "stable_id": "mat_national_2026_mu_bc_calculus_28", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 495 |
+
{"task": "smallmath-7600", "problem_id": 7600, "stable_id": "usemo_2026_western_05", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 496 |
+
{"task": "smallmath-7620", "problem_id": 7620, "stable_id": "elmo_2026_05", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 497 |
+
{"task": "smallmath-7625", "problem_id": 7625, "stable_id": "michigan_math_meet_2026_power_2_1d", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 498 |
+
{"task": "smallmath-7646", "problem_id": 7646, "stable_id": "mat_national_2026_mu_sequences_series_26", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 499 |
+
{"task": "smallmath-7656", "problem_id": 7656, "stable_id": "mat_national_2026_mu_area_volume_06", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 500 |
+
{"task": "smallmath-7662", "problem_id": 7662, "stable_id": "mat_national_2026_mu_area_volume_12", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 501 |
+
{"task": "smallmath-7691", "problem_id": 7691, "stable_id": "yale_gim_2026_individual_11", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 502 |
+
{"task": "smallmath-7729", "problem_id": 7729, "stable_id": "mat_national_2026_mu_polar_parametric_geometry_26", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 503 |
+
{"task": "smallmath-7751", "problem_id": 7751, "stable_id": "mit_integration_bee_2026_regular_20", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 504 |
+
{"task": "smallmath-7769", "problem_id": 7769, "stable_id": "mit_integration_bee_2026_final_05", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 505 |
+
{"task": "smallmath-7795", "problem_id": 7795, "stable_id": "mat_national_2026_mu_gemini_26", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 506 |
+
{"task": "smallmath-7797", "problem_id": 7797, "stable_id": "mat_national_2026_mu_gemini_28", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 507 |
+
{"task": "smallmath-7860", "problem_id": 7860, "stable_id": "mat_national_2026_mu_relay_4_02", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 508 |
+
{"task": "smallmath-7865", "problem_id": 7865, "stable_id": "mat_national_2026_mu_relay_5_01", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 509 |
+
{"task": "smallmath-7881", "problem_id": 7881, "stable_id": "spib_2026_round2_group_4_03", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 510 |
+
{"task": "smallmath-7884", "problem_id": 7884, "stable_id": "spib_2026_round2_quarterfinal_02", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 511 |
+
{"task": "smallmath-7888", "problem_id": 7888, "stable_id": "spib_2026_round2_semifinal_1_01", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 512 |
+
{"task": "smallmath-7900", "problem_id": 7900, "stable_id": "spib_2026_round2_third_03", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 513 |
+
{"task": "smallmath-7909", "problem_id": 7909, "stable_id": "spib_2026_round2_grand_tiebreaker_03", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 514 |
+
{"task": "smallmath-7970", "problem_id": 7970, "stable_id": "abmc_2026_october_online_10", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 515 |
+
{"task": "smallmath-7974", "problem_id": 7974, "stable_id": "abmc_2026_october_online_15", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 516 |
+
{"task": "smallmath-7979", "problem_id": 7979, "stable_id": "icmc_2026_team_a2", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 517 |
+
{"task": "smallmath-8001", "problem_id": 8001, "stable_id": "isi_integration_bee_2026_qualifying_15", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 518 |
+
{"task": "smallmath-8004", "problem_id": 8004, "stable_id": "isi_integration_bee_2026_r16_04", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 519 |
+
{"task": "smallmath-8011", "problem_id": 8011, "stable_id": "isi_integration_bee_2026_r4_02", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 520 |
+
{"task": "smallmath-8016", "problem_id": 8016, "stable_id": "isi_integration_bee_2026_final_02", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 521 |
+
{"task": "smallmath-8022", "problem_id": 8022, "stable_id": "uw_math_olympiad_2026_g67_04", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 522 |
+
{"task": "smallmath-8035", "problem_id": 8035, "stable_id": "abmc_2026_onsite_speed_08", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 523 |
+
{"task": "smallmath-8053", "problem_id": 8053, "stable_id": "abmc_2026_onsite_accuracy_02", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 524 |
+
{"task": "smallmath-8054", "problem_id": 8054, "stable_id": "abmc_2026_onsite_accuracy_03", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 525 |
+
{"task": "smallmath-8059", "problem_id": 8059, "stable_id": "abmc_2026_onsite_accuracy_08", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 526 |
+
{"task": "smallmath-8062", "problem_id": 8062, "stable_id": "abmc_2026_onsite_accuracy_11", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 527 |
+
{"task": "smallmath-8079", "problem_id": 8079, "stable_id": "abmc_2026_onsite_team_r7_01", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 528 |
+
{"task": "smallmath-8111", "problem_id": 8111, "stable_id": "wamo_waime_2026_06", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 529 |
+
{"task": "smallmath-8112", "problem_id": 8112, "stable_id": "wamo_waime_2026_07", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 530 |
+
{"task": "smallmath-8117", "problem_id": 8117, "stable_id": "wamo_waime_2026_12", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 531 |
+
{"task": "smallmath-8119", "problem_id": 8119, "stable_id": "wamo_waime_2026_14", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 532 |
+
{"task": "smallmath-8120", "problem_id": 8120, "stable_id": "wamo_waime_2026_15", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 533 |
+
{"task": "smallmath-8318", "problem_id": 8318, "stable_id": "unsw_integration_bee_2026_r2_07", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 534 |
+
{"task": "smallmath-8320", "problem_id": 8320, "stable_id": "unsw_integration_bee_2026_r2_12", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 535 |
+
{"task": "smallmath-8323", "problem_id": 8323, "stable_id": "unsw_integration_bee_2026_sf1_02", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 536 |
+
{"task": "smallmath-8331", "problem_id": 8331, "stable_id": "penn_philadelphia_2026_intermediate_team_01_2", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 537 |
+
{"task": "smallmath-8362", "problem_id": 8362, "stable_id": "nj_integration_bee_2026_qualifying_10", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 538 |
+
{"task": "smallmath-8437", "problem_id": 8437, "stable_id": "nj_integration_bee_2026_top8_09", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 539 |
+
{"task": "smallmath-8440", "problem_id": 8440, "stable_id": "nj_integration_bee_2026_top8_12", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 540 |
+
{"task": "smallmath-8460", "problem_id": 8460, "stable_id": "mig_2026_14", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 541 |
+
{"task": "smallmath-8569", "problem_id": 8569, "stable_id": "mat_national_2026_open_probability_combinatorics_12", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 542 |
+
{"task": "smallmath-8591", "problem_id": 8591, "stable_id": "stpetersburg_primary_2026_grade1_08", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 543 |
+
{"task": "smallmath-8604", "problem_id": 8604, "stable_id": "stpetersburg_primary_2026_grade4_02", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 544 |
+
{"task": "smallmath-8623", "problem_id": 8623, "stable_id": "ccamb_2026_div2_lightning_s5_01", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 545 |
+
{"task": "smallmath-8624", "problem_id": 8624, "stable_id": "ccamb_2026_div2_lightning_s5_02", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 546 |
+
{"task": "smallmath-8685", "problem_id": 8685, "stable_id": "mat_national_2026_open_comprehensive_28", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 547 |
+
{"task": "smallmath-8689", "problem_id": 8689, "stable_id": "stpetersburg_city_2026_grade6_05", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 548 |
+
{"task": "smallmath-8690", "problem_id": 8690, "stable_id": "stpetersburg_city_2026_grade6_06", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 549 |
+
{"task": "smallmath-8696", "problem_id": 8696, "stable_id": "stpetersburg_city_2026_grade9_04", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 550 |
+
{"task": "smallmath-8706", "problem_id": 8706, "stable_id": "mat_national_2026_open_statistics_06", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 551 |
+
{"task": "smallmath-8718", "problem_id": 8718, "stable_id": "mat_national_2026_open_statistics_21", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 552 |
+
{"task": "smallmath-8786", "problem_id": 8786, "stable_id": "mbmt_2026_abel_nt_04", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 553 |
+
{"task": "smallmath-8833", "problem_id": 8833, "stable_id": "mbmt_2026_jacobi_geometry_07", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 554 |
+
{"task": "smallmath-8986", "problem_id": 8986, "stable_id": "mat_national_2026_interschool_buy_in_08", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 555 |
+
{"task": "smallmath-8988", "problem_id": 8988, "stable_id": "mat_national_2026_interschool_buy_in_10", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 556 |
+
{"task": "smallmath-8999", "problem_id": 8999, "stable_id": "mat_national_2026_interschool_main_i_01", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 557 |
+
{"task": "smallmath-9007", "problem_id": 9007, "stable_id": "mat_national_2026_interschool_main_iv_02", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 558 |
+
{"task": "smallmath-9009", "problem_id": 9009, "stable_id": "mat_national_2026_interschool_main_iv_04", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 559 |
+
{"task": "smallmath-9012", "problem_id": 9012, "stable_id": "mat_national_2026_interschool_main_v_01", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 560 |
+
{"task": "smallmath-9014", "problem_id": 9014, "stable_id": "mat_national_2026_interschool_main_v_03", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 561 |
+
{"task": "smallmath-9015", "problem_id": 9015, "stable_id": "mat_national_2026_interschool_main_v_04", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 562 |
+
{"task": "smallmath-9037", "problem_id": 9037, "stable_id": "matprazdnik_2026_classic_grade7_05", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 563 |
+
{"task": "smallmath-9050", "problem_id": 9050, "stable_id": "comateq_2026_09", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 564 |
+
{"task": "smallmath-9062", "problem_id": 9062, "stable_id": "moscow_oral_2026_grade7_06", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 565 |
+
{"task": "smallmath-9063", "problem_id": 9063, "stable_id": "moscow_oral_2026_geometry_grades10_11_01", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 566 |
+
{"task": "smallmath-9088", "problem_id": 9088, "stable_id": "cubrmc_2026_team_10", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 567 |
+
{"task": "smallmath-9092", "problem_id": 9092, "stable_id": "penn_shanghai_2026_applied_senior_07", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 568 |
+
{"task": "smallmath-9105", "problem_id": 9105, "stable_id": "euler_russia_2026_final_04", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 569 |
+
{"task": "smallmath-9141", "problem_id": 9141, "stable_id": "hmi_2026_individual_26", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 570 |
+
{"task": "smallmath-9178", "problem_id": 9178, "stable_id": "ucsd_hmc_2026_part1_17", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 571 |
+
{"task": "smallmath-9191", "problem_id": 9191, "stable_id": "opg_2026_i_phase1_05", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 572 |
+
{"task": "smallmath-9239", "problem_id": 9239, "stable_id": "opg_2026_iii_phase2_10", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 573 |
+
{"task": "smallmath-9243", "problem_id": 9243, "stable_id": "durer_hungary_2026_xix_junior_written_a_04", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 574 |
+
{"task": "smallmath-9247", "problem_id": 9247, "stable_id": "durer_hungary_2026_xix_junior_written_b_05", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 575 |
+
{"task": "smallmath-9369", "problem_id": 9369, "stable_id": "durer_hungary_2026_xix_senior_written_e_03", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 576 |
+
{"task": "smallmath-9373", "problem_id": 9373, "stable_id": "northern_colorado_2026_spring_final_02", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 577 |
+
{"task": "smallmath-9393", "problem_id": 9393, "stable_id": "honduras_ctha_2026_basic_03", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 578 |
+
{"task": "smallmath-9426", "problem_id": 9426, "stable_id": "honduras_departmental_2026_r2_basic_04", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 579 |
+
{"task": "smallmath-9446", "problem_id": 9446, "stable_id": "durer_hungary_2026_xix_senior_relay_c_15", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 580 |
+
{"task": "smallmath-9447", "problem_id": 9447, "stable_id": "durer_hungary_2026_xix_senior_relay_c_16", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 581 |
+
{"task": "smallmath-9468", "problem_id": 9468, "stable_id": "honduras_primary_2026_r1_g4_03", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 582 |
+
{"task": "smallmath-9502", "problem_id": 9502, "stable_id": "epfl_eth_integration_bee_2026_main_15", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 583 |
+
{"task": "smallmath-9562", "problem_id": 9562, "stable_id": "vermont_2026_37", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 584 |
+
{"task": "smallmath-9591", "problem_id": 9591, "stable_id": "montana_mctm_2026_g78_app_03", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 585 |
+
{"task": "smallmath-9621", "problem_id": 9621, "stable_id": "montana_mctm_2026_g910_ck_12", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 586 |
+
{"task": "smallmath-9677", "problem_id": 9677, "stable_id": "snow_college_2026_senior_35", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 587 |
+
{"task": "smallmath-9703", "problem_id": 9703, "stable_id": "honduras_kangaroo_2026_benjamin_06", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 588 |
+
{"task": "smallmath-9734", "problem_id": 9734, "stable_id": "montana_mctm_2026_g1112_ck_24", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 589 |
+
{"task": "smallmath-9745", "problem_id": 9745, "stable_id": "montana_mctm_2026_g1112_team_06", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 590 |
+
{"task": "smallmath-9816", "problem_id": 9816, "stable_id": "wsmc_2026_state_knowdown_r1_12", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 591 |
+
{"task": "smallmath-9895", "problem_id": 9895, "stable_id": "bosnia_federal_2026_primary_g7_01", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 592 |
+
{"task": "smallmath-9914", "problem_id": 9914, "stable_id": "croatia_hmod_2026_d2_02", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 593 |
+
{"task": "smallmath-9918", "problem_id": 9918, "stable_id": "croatia_hjmo_2026_d2_02", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 594 |
+
{"task": "smallmath-9923", "problem_id": 9923, "stable_id": "croatia_hmo_2026_d4_01", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 595 |
+
{"task": "smallmath-9931", "problem_id": 9931, "stable_id": "bolivia_peque_2026_grade3_qualifier_07", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 596 |
+
{"task": "smallmath-9967", "problem_id": 9967, "stable_id": "davis_2026_elementary_individual_17", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 597 |
+
{"task": "smallmath-9977", "problem_id": 9977, "stable_id": "davis_2026_elementary_team_03", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 598 |
+
{"task": "smallmath-9979", "problem_id": 9979, "stable_id": "davis_2026_elementary_team_06", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 599 |
+
{"task": "smallmath-9985", "problem_id": 9985, "stable_id": "davis_2026_middle_individual_03", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 600 |
+
{"task": "smallmath-9993", "problem_id": 9993, "stable_id": "davis_2026_middle_individual_21", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
subsets/level_1.jsonl
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"task": "smallmath-0064", "problem_id": 64, "stable_id": "ukmt_smc_2026_01", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 2 |
+
{"task": "smallmath-0287", "problem_id": 287, "stable_id": "arml_2026_power_01b", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 3 |
+
{"task": "smallmath-0311", "problem_id": 311, "stable_id": "bmmt_2026_team_01", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 4 |
+
{"task": "smallmath-0483", "problem_id": 483, "stable_id": "purplecomet_2026_ms_01", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 5 |
+
{"task": "smallmath-0601", "problem_id": 601, "stable_id": "waterloo_2026_cayley_13", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 6 |
+
{"task": "smallmath-0644", "problem_id": 644, "stable_id": "waterloo_2026_euclid_02c", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 7 |
+
{"task": "smallmath-0705", "problem_id": 705, "stable_id": "waterloo_2026_ctmc_team_01", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 8 |
+
{"task": "smallmath-0706", "problem_id": 706, "stable_id": "waterloo_2026_ctmc_team_02", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 9 |
+
{"task": "smallmath-0708", "problem_id": 708, "stable_id": "waterloo_2026_ctmc_team_04", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 10 |
+
{"task": "smallmath-0730", "problem_id": 730, "stable_id": "waterloo_2026_ctmc_relay_1_b", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 11 |
+
{"task": "smallmath-0735", "problem_id": 735, "stable_id": "waterloo_2026_ctmc_relay_3_a", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 12 |
+
{"task": "smallmath-0921", "problem_id": 921, "stable_id": "italy_coordinators_2026_01", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 13 |
+
{"task": "smallmath-0925", "problem_id": 925, "stable_id": "italy_coordinators_2026_05", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 14 |
+
{"task": "smallmath-10170", "problem_id": 10170, "stable_id": "utah_state_2026_junior_08", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 15 |
+
{"task": "smallmath-10194", "problem_id": 10194, "stable_id": "utah_state_2026_senior_02", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 16 |
+
{"task": "smallmath-10360", "problem_id": 10360, "stable_id": "jamaica_jmo_2026_junior_final_g4_14", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 17 |
+
{"task": "smallmath-10639", "problem_id": 10639, "stable_id": "romania_comper_2026_stage2_g4_05", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 18 |
+
{"task": "smallmath-10659", "problem_id": 10659, "stable_id": "romania_comper_2026_stage2_g3_08", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 19 |
+
{"task": "smallmath-10664", "problem_id": 10664, "stable_id": "romania_comper_2026_stage2_g3_13", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 20 |
+
{"task": "smallmath-10671", "problem_id": 10671, "stable_id": "romania_comper_2026_stage2_g2_02", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 21 |
+
{"task": "smallmath-10679", "problem_id": 10679, "stable_id": "romania_comper_2026_stage2_g2_10", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 22 |
+
{"task": "smallmath-10683", "problem_id": 10683, "stable_id": "romania_comper_2026_stage2_g2_14", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 23 |
+
{"task": "smallmath-10684", "problem_id": 10684, "stable_id": "romania_comper_2026_stage2_g2_15", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 24 |
+
{"task": "smallmath-10694", "problem_id": 10694, "stable_id": "romania_comper_2026_stage2_g1_08", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 25 |
+
{"task": "smallmath-10699", "problem_id": 10699, "stable_id": "romania_comper_2026_stage2_g1_13", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 26 |
+
{"task": "smallmath-10702", "problem_id": 10702, "stable_id": "romania_comper_2026_stage2_g1_16", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 27 |
+
{"task": "smallmath-10712", "problem_id": 10712, "stable_id": "romania_comper_2026_stage2_g0_09", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 28 |
+
{"task": "smallmath-10727", "problem_id": 10727, "stable_id": "charleston_2026_level1_16", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 29 |
+
{"task": "smallmath-10755", "problem_id": 10755, "stable_id": "charleston_2026_level2_24", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 30 |
+
{"task": "smallmath-1171", "problem_id": 1171, "stable_id": "mongolia_school_2026_c_01", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 31 |
+
{"task": "smallmath-1454", "problem_id": 1454, "stable_id": "mathcounts_2026_state_countdown_50", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 32 |
+
{"task": "smallmath-1535", "problem_id": 1535, "stable_id": "brumo_2026_redpoint_04", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 33 |
+
{"task": "smallmath-1756", "problem_id": 1756, "stable_id": "bdmo_2026_2_higher_secondary_01", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 34 |
+
{"task": "smallmath-2315", "problem_id": 2315, "stable_id": "ramc_2026_e1_individual_13", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 35 |
+
{"task": "smallmath-2759", "problem_id": 2759, "stable_id": "femssisa_2026_grade4_05", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 36 |
+
{"task": "smallmath-2816", "problem_id": 2816, "stable_id": "und_2026_g78_i1_07", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 37 |
+
{"task": "smallmath-2857", "problem_id": 2857, "stable_id": "und_2026_g910_i1_02", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 38 |
+
{"task": "smallmath-2863", "problem_id": 2863, "stable_id": "und_2026_g910_i2_01", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 39 |
+
{"task": "smallmath-2872", "problem_id": 2872, "stable_id": "und_2026_g910_i3_05", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 40 |
+
{"task": "smallmath-2873", "problem_id": 2873, "stable_id": "und_2026_g910_i3_06", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 41 |
+
{"task": "smallmath-2879", "problem_id": 2879, "stable_id": "und_2026_g910_i4_05", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 42 |
+
{"task": "smallmath-2886", "problem_id": 2886, "stable_id": "und_2026_g910_t1_05", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 43 |
+
{"task": "smallmath-2890", "problem_id": 2890, "stable_id": "und_2026_g910_t1_09", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 44 |
+
{"task": "smallmath-2895", "problem_id": 2895, "stable_id": "und_2026_g910_t2_04", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 45 |
+
{"task": "smallmath-2896", "problem_id": 2896, "stable_id": "und_2026_g910_t2_05", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 46 |
+
{"task": "smallmath-2901", "problem_id": 2901, "stable_id": "und_2026_g910_t2_10", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 47 |
+
{"task": "smallmath-2904", "problem_id": 2904, "stable_id": "und_2026_g1112_i1_03", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 48 |
+
{"task": "smallmath-2916", "problem_id": 2916, "stable_id": "und_2026_g1112_i3_01", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 49 |
+
{"task": "smallmath-2923", "problem_id": 2923, "stable_id": "und_2026_g1112_i4_01", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 50 |
+
{"task": "smallmath-2924", "problem_id": 2924, "stable_id": "und_2026_g1112_i4_02", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 51 |
+
{"task": "smallmath-2930", "problem_id": 2930, "stable_id": "und_2026_g1112_t1_01", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 52 |
+
{"task": "smallmath-2933", "problem_id": 2933, "stable_id": "und_2026_g1112_t1_04", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 53 |
+
{"task": "smallmath-2935", "problem_id": 2935, "stable_id": "und_2026_g1112_t1_07", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 54 |
+
{"task": "smallmath-2939", "problem_id": 2939, "stable_id": "und_2026_g1112_t2_02", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 55 |
+
{"task": "smallmath-2944", "problem_id": 2944, "stable_id": "und_2026_g1112_t2_07", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 56 |
+
{"task": "smallmath-3297", "problem_id": 3297, "stable_id": "alabama_2026_algebra_31", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 57 |
+
{"task": "smallmath-3337", "problem_id": 3337, "stable_id": "alabama_2026_geometry_03", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 58 |
+
{"task": "smallmath-3341", "problem_id": 3341, "stable_id": "alabama_2026_geometry_07", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 59 |
+
{"task": "smallmath-3345", "problem_id": 3345, "stable_id": "alabama_2026_geometry_11", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 60 |
+
{"task": "smallmath-3360", "problem_id": 3360, "stable_id": "alabama_2026_geometry_26", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 61 |
+
{"task": "smallmath-3364", "problem_id": 3364, "stable_id": "alabama_2026_geometry_30", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 62 |
+
{"task": "smallmath-3521", "problem_id": 3521, "stable_id": "houston_2026_calculus_26", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 63 |
+
{"task": "smallmath-3548", "problem_id": 3548, "stable_id": "portugal_2026_mini_4ano_02", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 64 |
+
{"task": "smallmath-3599", "problem_id": 3599, "stable_id": "houston_2026_precalculus_08", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 65 |
+
{"task": "smallmath-3603", "problem_id": 3603, "stable_id": "houston_2026_precalculus_12", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 66 |
+
{"task": "smallmath-3618", "problem_id": 3618, "stable_id": "houston_2026_precalculus_30", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 67 |
+
{"task": "smallmath-3858", "problem_id": 3858, "stable_id": "finland_grade7_2026_helsinki_final_01a", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 68 |
+
{"task": "smallmath-4066", "problem_id": 4066, "stable_id": "uct_2026_grade9_07", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 69 |
+
{"task": "smallmath-4272", "problem_id": 4272, "stable_id": "latvia_2026_regional_grade8_03", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 70 |
+
{"task": "smallmath-4328", "problem_id": 4328, "stable_id": "latvia_tvc_2026_round4_07", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 71 |
+
{"task": "smallmath-4538", "problem_id": 4538, "stable_id": "nandu_2026_zonal_l1_01", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 72 |
+
{"task": "smallmath-4618", "problem_id": 4618, "stable_id": "umd_2026_part1_02", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 73 |
+
{"task": "smallmath-5085", "problem_id": 5085, "stable_id": "ecuador_2026_egmo_02", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 74 |
+
{"task": "smallmath-5116", "problem_id": 5116, "stable_id": "spain_intercentros_2026_relay_level2_a", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 75 |
+
{"task": "smallmath-5235", "problem_id": 5235, "stable_id": "paraguay_2026_primary_final_5_02", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 76 |
+
{"task": "smallmath-5289", "problem_id": 5289, "stable_id": "paraguay_2026_juvenile_department_1_01", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 77 |
+
{"task": "smallmath-5400", "problem_id": 5400, "stable_id": "bolivia_opmat_2026_epsilon_phase2_01", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 78 |
+
{"task": "smallmath-5794", "problem_id": 5794, "stable_id": "algeria_2026_first_m34_09", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 79 |
+
{"task": "smallmath-6217", "problem_id": 6217, "stable_id": "peru_conemate_2026_institutional_secondary_04", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 80 |
+
{"task": "smallmath-6343", "problem_id": 6343, "stable_id": "indonesia_osnk_2026_sd_11", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 81 |
+
{"task": "smallmath-6563", "problem_id": 6563, "stable_id": "thailand_association_2026_middle_11", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 82 |
+
{"task": "smallmath-6605", "problem_id": 6605, "stable_id": "france_national_2026_1_1", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 83 |
+
{"task": "smallmath-6606", "problem_id": 6606, "stable_id": "france_national_2026_1_2_q2", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 84 |
+
{"task": "smallmath-6890", "problem_id": 6890, "stable_id": "peru_cmb_2026_final_3p_a3", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 85 |
+
{"task": "smallmath-7865", "problem_id": 7865, "stable_id": "mat_national_2026_mu_relay_5_01", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 86 |
+
{"task": "smallmath-8053", "problem_id": 8053, "stable_id": "abmc_2026_onsite_accuracy_02", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 87 |
+
{"task": "smallmath-8362", "problem_id": 8362, "stable_id": "nj_integration_bee_2026_qualifying_10", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 88 |
+
{"task": "smallmath-8569", "problem_id": 8569, "stable_id": "mat_national_2026_open_probability_combinatorics_12", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 89 |
+
{"task": "smallmath-9191", "problem_id": 9191, "stable_id": "opg_2026_i_phase1_05", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 90 |
+
{"task": "smallmath-9393", "problem_id": 9393, "stable_id": "honduras_ctha_2026_basic_03", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 91 |
+
{"task": "smallmath-9591", "problem_id": 9591, "stable_id": "montana_mctm_2026_g78_app_03", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 92 |
+
{"task": "smallmath-9621", "problem_id": 9621, "stable_id": "montana_mctm_2026_g910_ck_12", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 93 |
+
{"task": "smallmath-9677", "problem_id": 9677, "stable_id": "snow_college_2026_senior_35", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 94 |
+
{"task": "smallmath-9734", "problem_id": 9734, "stable_id": "montana_mctm_2026_g1112_ck_24", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 95 |
+
{"task": "smallmath-9816", "problem_id": 9816, "stable_id": "wsmc_2026_state_knowdown_r1_12", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 96 |
+
{"task": "smallmath-9931", "problem_id": 9931, "stable_id": "bolivia_peque_2026_grade3_qualifier_07", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 97 |
+
{"task": "smallmath-9967", "problem_id": 9967, "stable_id": "davis_2026_elementary_individual_17", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 98 |
+
{"task": "smallmath-9977", "problem_id": 9977, "stable_id": "davis_2026_elementary_team_03", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 99 |
+
{"task": "smallmath-9979", "problem_id": 9979, "stable_id": "davis_2026_elementary_team_06", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
| 100 |
+
{"task": "smallmath-9985", "problem_id": 9985, "stable_id": "davis_2026_middle_individual_03", "level": 1, "difficulty": 1, "answer_kind": "integer"}
|
subsets/level_2.jsonl
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"task": "smallmath-0202", "problem_id": 202, "stable_id": "cjmo_2026_01", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 2 |
+
{"task": "smallmath-0299", "problem_id": 299, "stable_id": "bmmt_2026_individual_09", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 3 |
+
{"task": "smallmath-0309", "problem_id": 309, "stable_id": "bmmt_2026_individual_19", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 4 |
+
{"task": "smallmath-0316", "problem_id": 316, "stable_id": "bmmt_2026_team_06", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 5 |
+
{"task": "smallmath-0318", "problem_id": 318, "stable_id": "bmmt_2026_team_08", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 6 |
+
{"task": "smallmath-0473", "problem_id": 473, "stable_id": "purplecomet_2026_hs_21", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 7 |
+
{"task": "smallmath-0496", "problem_id": 496, "stable_id": "purplecomet_2026_ms_14", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 8 |
+
{"task": "smallmath-0544", "problem_id": 544, "stable_id": "nzmo_2026_round1_01", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 9 |
+
{"task": "smallmath-0548", "problem_id": 548, "stable_id": "mathprize_girls_2026_01", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 10 |
+
{"task": "smallmath-0688", "problem_id": 688, "stable_id": "waterloo_2026_hypatia_02a", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 11 |
+
{"task": "smallmath-0713", "problem_id": 713, "stable_id": "waterloo_2026_ctmc_team_09", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 12 |
+
{"task": "smallmath-0719", "problem_id": 719, "stable_id": "waterloo_2026_ctmc_team_16", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 13 |
+
{"task": "smallmath-0927", "problem_id": 927, "stable_id": "italy_coordinators_2026_07", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 14 |
+
{"task": "smallmath-0954", "problem_id": 954, "stable_id": "obm_2026_univ_02", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 15 |
+
{"task": "smallmath-10178", "problem_id": 10178, "stable_id": "utah_state_2026_junior_16", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 16 |
+
{"task": "smallmath-10213", "problem_id": 10213, "stable_id": "utah_state_2026_senior_24", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 17 |
+
{"task": "smallmath-10406", "problem_id": 10406, "stable_id": "cwml_2026_meet2_geometry_03", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 18 |
+
{"task": "smallmath-10559", "problem_id": 10559, "stable_id": "azerbaijan_rfm_2026_final_g7_08", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 19 |
+
{"task": "smallmath-10577", "problem_id": 10577, "stable_id": "romania_comper_2026_stage2_g8_11", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 20 |
+
{"task": "smallmath-10605", "problem_id": 10605, "stable_id": "romania_comper_2026_stage2_g6_03", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 21 |
+
{"task": "smallmath-10776", "problem_id": 10776, "stable_id": "charleston_2026_reciprocity_sprint_04", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 22 |
+
{"task": "smallmath-10879", "problem_id": 10879, "stable_id": "fcml_2026_match4_1_3", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 23 |
+
{"task": "smallmath-10995", "problem_id": 10995, "stable_id": "fcml_2026_match6_6_1", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 24 |
+
{"task": "smallmath-11017", "problem_id": 11017, "stable_id": "fcml_2026_match1_5_3", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 25 |
+
{"task": "smallmath-11129", "problem_id": 11129, "stable_id": "brazil_campinense_2026_level3_02", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 26 |
+
{"task": "smallmath-11563", "problem_id": 11563, "stable_id": "brazil_oprm_2026_phase1_level1_16", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 27 |
+
{"task": "smallmath-11606", "problem_id": 11606, "stable_id": "brazil_oprm_2026_phase2_level1_01b", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 28 |
+
{"task": "smallmath-11625", "problem_id": 11625, "stable_id": "brazil_oprm_2026_phase2_level2_03b", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 29 |
+
{"task": "smallmath-1612", "problem_id": 1612, "stable_id": "cmm_2026_bee_qualifying_2", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 30 |
+
{"task": "smallmath-1613", "problem_id": 1613, "stable_id": "cmm_2026_bee_qualifying_4", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 31 |
+
{"task": "smallmath-1620", "problem_id": 1620, "stable_id": "cmm_2026_bee_finals_6", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 32 |
+
{"task": "smallmath-1734", "problem_id": 1734, "stable_id": "bdmo_2026_1_higher_secondary_04", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 33 |
+
{"task": "smallmath-1875", "problem_id": 1875, "stable_id": "bdmo_2026_7_higher_secondary_01", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 34 |
+
{"task": "smallmath-1929", "problem_id": 1929, "stable_id": "comc_2026_c1c", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 35 |
+
{"task": "smallmath-1966", "problem_id": 1966, "stable_id": "peru_preigo_2026_elemental_08", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 36 |
+
{"task": "smallmath-2131", "problem_id": 2131, "stable_id": "kmo_2026_first_middle_10", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 37 |
+
{"task": "smallmath-2292", "problem_id": 2292, "stable_id": "mathchallengers_2026_regional_coop_06", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 38 |
+
{"task": "smallmath-2420", "problem_id": 2420, "stable_id": "croatia_national_b_grade2_2026_01", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 39 |
+
{"task": "smallmath-2455", "problem_id": 2455, "stable_id": "bulgaria_senior1_2026_02", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 40 |
+
{"task": "smallmath-2460", "problem_id": 2460, "stable_id": "bulgaria_universityb_2026_02", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 41 |
+
{"task": "smallmath-2496", "problem_id": 2496, "stable_id": "imt_2026_number_theory_01", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 42 |
+
{"task": "smallmath-2534", "problem_id": 2534, "stable_id": "imt_2026_integrated_12a", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 43 |
+
{"task": "smallmath-2540", "problem_id": 2540, "stable_id": "imt_2026_integrated_18b", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 44 |
+
{"task": "smallmath-2545", "problem_id": 2545, "stable_id": "imt_2026_integrated_20d_i", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 45 |
+
{"task": "smallmath-2546", "problem_id": 2546, "stable_id": "imt_2026_integrated_20d_ii", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 46 |
+
{"task": "smallmath-2627", "problem_id": 2627, "stable_id": "ithaca_2026_team_10", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 47 |
+
{"task": "smallmath-2651", "problem_id": 2651, "stable_id": "israel_young_f_grade3_2026_01", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 48 |
+
{"task": "smallmath-2723", "problem_id": 2723, "stable_id": "kangaroo_germany_2026_1113_b9", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 49 |
+
{"task": "smallmath-2831", "problem_id": 2831, "stable_id": "und_2026_g78_i4_02", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 50 |
+
{"task": "smallmath-2852", "problem_id": 2852, "stable_id": "und_2026_g78_t2_07", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 51 |
+
{"task": "smallmath-2862", "problem_id": 2862, "stable_id": "und_2026_g910_i1_07", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 52 |
+
{"task": "smallmath-2870", "problem_id": 2870, "stable_id": "und_2026_g910_i3_03", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 53 |
+
{"task": "smallmath-2912", "problem_id": 2912, "stable_id": "und_2026_g1112_i2_04", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 54 |
+
{"task": "smallmath-2925", "problem_id": 2925, "stable_id": "und_2026_g1112_i4_03", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 55 |
+
{"task": "smallmath-2927", "problem_id": 2927, "stable_id": "und_2026_g1112_i4_05", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 56 |
+
{"task": "smallmath-3301", "problem_id": 3301, "stable_id": "alabama_2026_algebra_35", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 57 |
+
{"task": "smallmath-3358", "problem_id": 3358, "stable_id": "alabama_2026_geometry_24", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 58 |
+
{"task": "smallmath-3462", "problem_id": 3462, "stable_id": "kangourou_italia_2026_semifinal_cadet_18", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 59 |
+
{"task": "smallmath-3524", "problem_id": 3524, "stable_id": "houston_2026_calculus_29", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 60 |
+
{"task": "smallmath-3596", "problem_id": 3596, "stable_id": "houston_2026_precalculus_02", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 61 |
+
{"task": "smallmath-3621", "problem_id": 3621, "stable_id": "houston_2026_precalculus_33", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 62 |
+
{"task": "smallmath-3663", "problem_id": 3663, "stable_id": "kangourou_italy_team_benjamin_2026_r1_01", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 63 |
+
{"task": "smallmath-3750", "problem_id": 3750, "stable_id": "kangourou_italy_team_cadet_2026_r2_13", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 64 |
+
{"task": "smallmath-3827", "problem_id": 3827, "stable_id": "smt_sweden_2026_qualification_03", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 65 |
+
{"task": "smallmath-3889", "problem_id": 3889, "stable_id": "abel_2026_second_01", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 66 |
+
{"task": "smallmath-3955", "problem_id": 3955, "stable_id": "slovenia_2026_regional_grade9_a5", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 67 |
+
{"task": "smallmath-4011", "problem_id": 4011, "stable_id": "spain_ome_2026_madrid_phasezero_04", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 68 |
+
{"task": "smallmath-4220", "problem_id": 4220, "stable_id": "spain_guadalajara_2026_juvenil_school_02", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 69 |
+
{"task": "smallmath-4300", "problem_id": 4300, "stable_id": "spain_murcia_2026_comarcal_eso_01a1", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 70 |
+
{"task": "smallmath-4796", "problem_id": 4796, "stable_id": "southampton_2026_senior_01", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 71 |
+
{"task": "smallmath-4825", "problem_id": 4825, "stable_id": "mexico_yucatan_2026_school_02", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 72 |
+
{"task": "smallmath-4881", "problem_id": 4881, "stable_id": "spain_primavera_2026_phase1_level3_11", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 73 |
+
{"task": "smallmath-5216", "problem_id": 5216, "stable_id": "paraguay_2026_juvenile_final_3_04", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 74 |
+
{"task": "smallmath-5514", "problem_id": 5514, "stable_id": "armenia_2026_regional_g7_03", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 75 |
+
{"task": "smallmath-5618", "problem_id": 5618, "stable_id": "greece_euclid_2026_grade9_04", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 76 |
+
{"task": "smallmath-5645", "problem_id": 5645, "stable_id": "greece_archimedes_2026_junior_01", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 77 |
+
{"task": "smallmath-5687", "problem_id": 5687, "stable_id": "greece_thales_2026_grade12_01", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 78 |
+
{"task": "smallmath-5707", "problem_id": 5707, "stable_id": "india_nmtc_2026_junior_screening_18", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 79 |
+
{"task": "smallmath-5908", "problem_id": 5908, "stable_id": "morocco_mmc_junior_dm_2026_iii1a", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 80 |
+
{"task": "smallmath-6600", "problem_id": 6600, "stable_id": "mobile_2026_high_05", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 81 |
+
{"task": "smallmath-6608", "problem_id": 6608, "stable_id": "france_national_2026_1_6_q3", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 82 |
+
{"task": "smallmath-6786", "problem_id": 6786, "stable_id": "peru_cmb_2026_institutional_2s_3s_06", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 83 |
+
{"task": "smallmath-6883", "problem_id": 6883, "stable_id": "germany_zfm_tdm_2026_s_05", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 84 |
+
{"task": "smallmath-7593", "problem_id": 7593, "stable_id": "mat_national_2026_mu_bc_calculus_28", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 85 |
+
{"task": "smallmath-7620", "problem_id": 7620, "stable_id": "elmo_2026_05", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 86 |
+
{"task": "smallmath-7656", "problem_id": 7656, "stable_id": "mat_national_2026_mu_area_volume_06", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 87 |
+
{"task": "smallmath-7662", "problem_id": 7662, "stable_id": "mat_national_2026_mu_area_volume_12", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 88 |
+
{"task": "smallmath-8054", "problem_id": 8054, "stable_id": "abmc_2026_onsite_accuracy_03", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 89 |
+
{"task": "smallmath-8440", "problem_id": 8440, "stable_id": "nj_integration_bee_2026_top8_12", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 90 |
+
{"task": "smallmath-8604", "problem_id": 8604, "stable_id": "stpetersburg_primary_2026_grade4_02", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 91 |
+
{"task": "smallmath-8685", "problem_id": 8685, "stable_id": "mat_national_2026_open_comprehensive_28", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 92 |
+
{"task": "smallmath-8786", "problem_id": 8786, "stable_id": "mbmt_2026_abel_nt_04", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 93 |
+
{"task": "smallmath-8999", "problem_id": 8999, "stable_id": "mat_national_2026_interschool_main_i_01", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 94 |
+
{"task": "smallmath-9050", "problem_id": 9050, "stable_id": "comateq_2026_09", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 95 |
+
{"task": "smallmath-9141", "problem_id": 9141, "stable_id": "hmi_2026_individual_26", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 96 |
+
{"task": "smallmath-9426", "problem_id": 9426, "stable_id": "honduras_departmental_2026_r2_basic_04", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 97 |
+
{"task": "smallmath-9468", "problem_id": 9468, "stable_id": "honduras_primary_2026_r1_g4_03", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 98 |
+
{"task": "smallmath-9703", "problem_id": 9703, "stable_id": "honduras_kangaroo_2026_benjamin_06", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 99 |
+
{"task": "smallmath-9745", "problem_id": 9745, "stable_id": "montana_mctm_2026_g1112_team_06", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
| 100 |
+
{"task": "smallmath-9993", "problem_id": 9993, "stable_id": "davis_2026_middle_individual_21", "level": 2, "difficulty": 2, "answer_kind": "integer"}
|
subsets/level_3.jsonl
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"task": "smallmath-0121", "problem_id": 121, "stable_id": "cmimc_2026_combo_01", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 2 |
+
{"task": "smallmath-0154", "problem_id": 154, "stable_id": "hmmt_feb_2026_guts_09", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 3 |
+
{"task": "smallmath-0158", "problem_id": 158, "stable_id": "hmmt_feb_2026_guts_13", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 4 |
+
{"task": "smallmath-0197", "problem_id": 197, "stable_id": "british_bmo2_2026_01", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 5 |
+
{"task": "smallmath-0198", "problem_id": 198, "stable_id": "nordic_2026_01", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 6 |
+
{"task": "smallmath-0235", "problem_id": 235, "stable_id": "ioqm_2026_m1_24", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 7 |
+
{"task": "smallmath-0258", "problem_id": 258, "stable_id": "arml_2026_individual_07", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 8 |
+
{"task": "smallmath-0490", "problem_id": 490, "stable_id": "purplecomet_2026_ms_08", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 9 |
+
{"task": "smallmath-0681", "problem_id": 681, "stable_id": "waterloo_2026_galois_03c", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 10 |
+
{"task": "smallmath-0799", "problem_id": 799, "stable_id": "ireland_2026_03", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 11 |
+
{"task": "smallmath-0811", "problem_id": 811, "stable_id": "elon_lages_2026_05", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 12 |
+
{"task": "smallmath-10036", "problem_id": 10036, "stable_id": "azerbaijan_rfo_2026_regional_g8_10", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 13 |
+
{"task": "smallmath-10785", "problem_id": 10785, "stable_id": "csaml_2026_state_1_3", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 14 |
+
{"task": "smallmath-10828", "problem_id": 10828, "stable_id": "csaml_2026_arml_qualifier_23", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 15 |
+
{"task": "smallmath-10836", "problem_id": 10836, "stable_id": "csaml_2026_arml_tst1_06", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 16 |
+
{"task": "smallmath-1086", "problem_id": 1086, "stable_id": "hk_primary_elite_2026_calculation_05", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 17 |
+
{"task": "smallmath-10871", "problem_id": 10871, "stable_id": "montenegro_state_2026_g6_03", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 18 |
+
{"task": "smallmath-10925", "problem_id": 10925, "stable_id": "puerto_rico_ompr_2026_firstphase_level3_12", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 19 |
+
{"task": "smallmath-1154", "problem_id": 1154, "stable_id": "dutch_selection_b_2026_05", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 20 |
+
{"task": "smallmath-11712", "problem_id": 11712, "stable_id": "hungary_kalmar_2026_regional_g7_03", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 21 |
+
{"task": "smallmath-11761", "problem_id": 11761, "stable_id": "hmmt_nov_2026_team_08", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 22 |
+
{"task": "smallmath-11762", "problem_id": 11762, "stable_id": "hmmt_nov_2026_team_09", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 23 |
+
{"task": "smallmath-11786", "problem_id": 11786, "stable_id": "hmmt_nov_2026_guts_23", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 24 |
+
{"task": "smallmath-11788", "problem_id": 11788, "stable_id": "hmmt_nov_2026_guts_25", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 25 |
+
{"task": "smallmath-11795", "problem_id": 11795, "stable_id": "hmmt_nov_2026_guts_32", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 26 |
+
{"task": "smallmath-1220", "problem_id": 1220, "stable_id": "mongolia_regional_2026_e_02", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 27 |
+
{"task": "smallmath-1615", "problem_id": 1615, "stable_id": "cmm_2026_bee_qualifying_9", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 28 |
+
{"task": "smallmath-1619", "problem_id": 1619, "stable_id": "cmm_2026_bee_finals_5", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 29 |
+
{"task": "smallmath-1642", "problem_id": 1642, "stable_id": "cmm_2026_bee_finals_50", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 30 |
+
{"task": "smallmath-1688", "problem_id": 1688, "stable_id": "romania_junior_selection3_2026_03", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 31 |
+
{"task": "smallmath-1696", "problem_id": 1696, "stable_id": "ukmog_2026_03", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 32 |
+
{"task": "smallmath-1841", "problem_id": 1841, "stable_id": "bdmo_2026_6_junior_07", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 33 |
+
{"task": "smallmath-1873", "problem_id": 1873, "stable_id": "bdmo_2026_7_secondary_06", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 34 |
+
{"task": "smallmath-1949", "problem_id": 1949, "stable_id": "amc8_2026_16", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 35 |
+
{"task": "smallmath-2125", "problem_id": 2125, "stable_id": "kmo_2026_first_middle_04", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 36 |
+
{"task": "smallmath-2134", "problem_id": 2134, "stable_id": "kmo_2026_first_middle_13", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 37 |
+
{"task": "smallmath-2523", "problem_id": 2523, "stable_id": "imt_2026_integrated_04a", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 38 |
+
{"task": "smallmath-2640", "problem_id": 2640, "stable_id": "israel_young_b_grade3_2026_03", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 39 |
+
{"task": "smallmath-2646", "problem_id": 2646, "stable_id": "israel_young_b_grade6_7_2026_03", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 40 |
+
{"task": "smallmath-2720", "problem_id": 2720, "stable_id": "kangaroo_germany_2026_1113_b5", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 41 |
+
{"task": "smallmath-2913", "problem_id": 2913, "stable_id": "und_2026_g1112_i2_05", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 42 |
+
{"task": "smallmath-3047", "problem_id": 3047, "stable_id": "hkmkc_2026_pre_ecolier_25", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 43 |
+
{"task": "smallmath-3118", "problem_id": 3118, "stable_id": "croatia_school_b_grade3_2026_04", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 44 |
+
{"task": "smallmath-3508", "problem_id": 3508, "stable_id": "houston_2026_calculus_12", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 45 |
+
{"task": "smallmath-3692", "problem_id": 3692, "stable_id": "georgmohr_2026_second_01", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 46 |
+
{"task": "smallmath-3768", "problem_id": 3768, "stable_id": "portugal_2026_final_a_3", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 47 |
+
{"task": "smallmath-3786", "problem_id": 3786, "stable_id": "kangourou_italy_team_junior_2026_r1_12", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 48 |
+
{"task": "smallmath-3789", "problem_id": 3789, "stable_id": "kangourou_italy_team_junior_2026_r1_15", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 49 |
+
{"task": "smallmath-3811", "problem_id": 3811, "stable_id": "houston_2026_statistics_10", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 50 |
+
{"task": "smallmath-3815", "problem_id": 3815, "stable_id": "houston_2026_statistics_31", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 51 |
+
{"task": "smallmath-3823", "problem_id": 3823, "stable_id": "hmt_sweden_2026_final_05", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 52 |
+
{"task": "smallmath-4142", "problem_id": 4142, "stable_id": "vilnius_university_2026_02", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 53 |
+
{"task": "smallmath-4206", "problem_id": 4206, "stable_id": "estonia_2026_open_junior_03", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 54 |
+
{"task": "smallmath-4227", "problem_id": 4227, "stable_id": "spain_guadalajara_2026_ome_local_04", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 55 |
+
{"task": "smallmath-4228", "problem_id": 4228, "stable_id": "spain_ofem_2026_01", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 56 |
+
{"task": "smallmath-4273", "problem_id": 4273, "stable_id": "latvia_2026_regional_grade8_04", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 57 |
+
{"task": "smallmath-4305", "problem_id": 4305, "stable_id": "spain_murcia_2026_comarcal_eso_03", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 58 |
+
{"task": "smallmath-4311", "problem_id": 4311, "stable_id": "spain_murcia_2026_regional_eso_02a", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 59 |
+
{"task": "smallmath-4366", "problem_id": 4366, "stable_id": "spain_thales_2026_regional_juvenil_p03", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 60 |
+
{"task": "smallmath-4368", "problem_id": 4368, "stable_id": "spain_thales_2026_regional_juvenil_p06", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 61 |
+
{"task": "smallmath-4386", "problem_id": 4386, "stable_id": "spain_thales_junior_2026_provincial_04", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 62 |
+
{"task": "smallmath-4398", "problem_id": 4398, "stable_id": "spain_galicia_junior_2026_final_01", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 63 |
+
{"task": "smallmath-4763", "problem_id": 4763, "stable_id": "lithuania_2026_national_s03", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 64 |
+
{"task": "smallmath-4778", "problem_id": 4778, "stable_id": "melbourne_2026_junior_04", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 65 |
+
{"task": "smallmath-5098", "problem_id": 5098, "stable_id": "ecuador_2026_cono2_06", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 66 |
+
{"task": "smallmath-5103", "problem_id": 5103, "stable_id": "mexico_guanajuato_girls_final_2026_02", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 67 |
+
{"task": "smallmath-5137", "problem_id": 5137, "stable_id": "moldova_2026_national_g7_07", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 68 |
+
{"task": "smallmath-5175", "problem_id": 5175, "stable_id": "spain_esprint_2026_bach_08", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 69 |
+
{"task": "smallmath-5343", "problem_id": 5343, "stable_id": "bolivia_opmat_2026_gamma_final_03", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 70 |
+
{"task": "smallmath-5588", "problem_id": 5588, "stable_id": "greece_little_euclid_2026_grade6_09", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 71 |
+
{"task": "smallmath-5682", "problem_id": 5682, "stable_id": "greece_thales_2026_grade10_01", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 72 |
+
{"task": "smallmath-5883", "problem_id": 5883, "stable_id": "morocco_mmc_university_2026_02", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 73 |
+
{"task": "smallmath-5928", "problem_id": 5928, "stable_id": "ffjm_2026_semifinal_11", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 74 |
+
{"task": "smallmath-6048", "problem_id": 6048, "stable_id": "ffjm_2026_international1_03", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 75 |
+
{"task": "smallmath-6484", "problem_id": 6484, "stable_id": "germany_mo_2026_landes65_650735", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 76 |
+
{"task": "smallmath-6632", "problem_id": 6632, "stable_id": "peru_bertolt_brecht_2026_secondary1_11", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 77 |
+
{"task": "smallmath-7337", "problem_id": 7337, "stable_id": "lexington_2026_spring_team_11", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 78 |
+
{"task": "smallmath-7537", "problem_id": 7537, "stable_id": "lexington_2026_spring_guts_25", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 79 |
+
{"task": "smallmath-7646", "problem_id": 7646, "stable_id": "mat_national_2026_mu_sequences_series_26", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 80 |
+
{"task": "smallmath-7729", "problem_id": 7729, "stable_id": "mat_national_2026_mu_polar_parametric_geometry_26", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 81 |
+
{"task": "smallmath-7795", "problem_id": 7795, "stable_id": "mat_national_2026_mu_gemini_26", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 82 |
+
{"task": "smallmath-7797", "problem_id": 7797, "stable_id": "mat_national_2026_mu_gemini_28", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 83 |
+
{"task": "smallmath-7860", "problem_id": 7860, "stable_id": "mat_national_2026_mu_relay_4_02", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 84 |
+
{"task": "smallmath-7881", "problem_id": 7881, "stable_id": "spib_2026_round2_group_4_03", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 85 |
+
{"task": "smallmath-7888", "problem_id": 7888, "stable_id": "spib_2026_round2_semifinal_1_01", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 86 |
+
{"task": "smallmath-7900", "problem_id": 7900, "stable_id": "spib_2026_round2_third_03", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 87 |
+
{"task": "smallmath-8004", "problem_id": 8004, "stable_id": "isi_integration_bee_2026_r16_04", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 88 |
+
{"task": "smallmath-8035", "problem_id": 8035, "stable_id": "abmc_2026_onsite_speed_08", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 89 |
+
{"task": "smallmath-8059", "problem_id": 8059, "stable_id": "abmc_2026_onsite_accuracy_08", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 90 |
+
{"task": "smallmath-8320", "problem_id": 8320, "stable_id": "unsw_integration_bee_2026_r2_12", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 91 |
+
{"task": "smallmath-8437", "problem_id": 8437, "stable_id": "nj_integration_bee_2026_top8_09", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 92 |
+
{"task": "smallmath-8460", "problem_id": 8460, "stable_id": "mig_2026_14", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 93 |
+
{"task": "smallmath-8706", "problem_id": 8706, "stable_id": "mat_national_2026_open_statistics_06", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 94 |
+
{"task": "smallmath-8833", "problem_id": 8833, "stable_id": "mbmt_2026_jacobi_geometry_07", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 95 |
+
{"task": "smallmath-8986", "problem_id": 8986, "stable_id": "mat_national_2026_interschool_buy_in_08", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 96 |
+
{"task": "smallmath-8988", "problem_id": 8988, "stable_id": "mat_national_2026_interschool_buy_in_10", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 97 |
+
{"task": "smallmath-9373", "problem_id": 9373, "stable_id": "northern_colorado_2026_spring_final_02", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 98 |
+
{"task": "smallmath-9502", "problem_id": 9502, "stable_id": "epfl_eth_integration_bee_2026_main_15", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 99 |
+
{"task": "smallmath-9895", "problem_id": 9895, "stable_id": "bosnia_federal_2026_primary_g7_01", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
| 100 |
+
{"task": "smallmath-9923", "problem_id": 9923, "stable_id": "croatia_hmo_2026_d4_01", "level": 3, "difficulty": 3, "answer_kind": "integer"}
|
subsets/level_4.jsonl
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"task": "smallmath-0032", "problem_id": 32, "stable_id": "hmmt_feb_2026_algnt_02", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 2 |
+
{"task": "smallmath-0036", "problem_id": 36, "stable_id": "hmmt_feb_2026_algnt_06", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 3 |
+
{"task": "smallmath-0053", "problem_id": 53, "stable_id": "hmmt_feb_2026_geo_03", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 4 |
+
{"task": "smallmath-0061", "problem_id": 61, "stable_id": "hmmt_feb_2026_team_02", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 5 |
+
{"task": "smallmath-0104", "problem_id": 104, "stable_id": "ukmt_imc_2026_17", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 6 |
+
{"task": "smallmath-0142", "problem_id": 142, "stable_id": "cmimc_2026_team_07", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 7 |
+
{"task": "smallmath-0163", "problem_id": 163, "stable_id": "hmmt_feb_2026_guts_18", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 8 |
+
{"task": "smallmath-0189", "problem_id": 189, "stable_id": "usa_egmotst_2026_04", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 9 |
+
{"task": "smallmath-0196", "problem_id": 196, "stable_id": "balkan_2026_04", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 10 |
+
{"task": "smallmath-0200", "problem_id": 200, "stable_id": "cmo_2026_03", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 11 |
+
{"task": "smallmath-0325", "problem_id": 325, "stable_id": "bmmt_2026_team_15", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 12 |
+
{"task": "smallmath-0327", "problem_id": 327, "stable_id": "bmmt_2026_team_17", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 13 |
+
{"task": "smallmath-0383", "problem_id": 383, "stable_id": "ukmt_pink_2026_20", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 14 |
+
{"task": "smallmath-0428", "problem_id": 428, "stable_id": "ukmt_grey_2026_23", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 15 |
+
{"task": "smallmath-0477", "problem_id": 477, "stable_id": "purplecomet_2026_hs_25", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 16 |
+
{"task": "smallmath-0528", "problem_id": 528, "stable_id": "dutch_r1_2026_a2", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 17 |
+
{"task": "smallmath-0560", "problem_id": 560, "stable_id": "mathprize_girls_2026_13", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 18 |
+
{"task": "smallmath-0806", "problem_id": 806, "stable_id": "memo_individual_2026_02", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 19 |
+
{"task": "smallmath-0859", "problem_id": 859, "stable_id": "italy_team_final_2026_16", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 20 |
+
{"task": "smallmath-0864", "problem_id": 864, "stable_id": "italy_team_final_2026_21", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 21 |
+
{"task": "smallmath-0890", "problem_id": 890, "stable_id": "italy_district_2026_11", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 22 |
+
{"task": "smallmath-0900", "problem_id": 900, "stable_id": "italy_team_female_final_2026_06", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 23 |
+
{"task": "smallmath-0932", "problem_id": 932, "stable_id": "pamo_2026_06", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 24 |
+
{"task": "smallmath-0939", "problem_id": 939, "stable_id": "maio_2026_l2_01", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 25 |
+
{"task": "smallmath-0955", "problem_id": 955, "stable_id": "ibero_2026_01", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 26 |
+
{"task": "smallmath-10913", "problem_id": 10913, "stable_id": "north_macedonia_2026_primary_municipal_g7_03", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 27 |
+
{"task": "smallmath-11012", "problem_id": 11012, "stable_id": "fcml_2026_match1_3_3", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 28 |
+
{"task": "smallmath-11100", "problem_id": 11100, "stable_id": "north_macedonia_2026_secondary_national_s1_04", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 29 |
+
{"task": "smallmath-11165", "problem_id": 11165, "stable_id": "north_macedonia_2026_imo_selection_01", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 30 |
+
{"task": "smallmath-11168", "problem_id": 11168, "stable_id": "north_macedonia_2026_jbmo_selection_02", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 31 |
+
{"task": "smallmath-11739", "problem_id": 11739, "stable_id": "hmmt_nov_2026_gen_06", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 32 |
+
{"task": "smallmath-11741", "problem_id": 11741, "stable_id": "hmmt_nov_2026_gen_08", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 33 |
+
{"task": "smallmath-11742", "problem_id": 11742, "stable_id": "hmmt_nov_2026_gen_09", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 34 |
+
{"task": "smallmath-11757", "problem_id": 11757, "stable_id": "hmmt_nov_2026_team_04", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 35 |
+
{"task": "smallmath-11772", "problem_id": 11772, "stable_id": "hmmt_nov_2026_guts_09", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 36 |
+
{"task": "smallmath-11777", "problem_id": 11777, "stable_id": "hmmt_nov_2026_guts_14", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 37 |
+
{"task": "smallmath-11783", "problem_id": 11783, "stable_id": "hmmt_nov_2026_guts_20", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 38 |
+
{"task": "smallmath-11792", "problem_id": 11792, "stable_id": "hmmt_nov_2026_guts_29", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 39 |
+
{"task": "smallmath-11794", "problem_id": 11794, "stable_id": "hmmt_nov_2026_guts_31", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 40 |
+
{"task": "smallmath-1190", "problem_id": 1190, "stable_id": "mongolia_school_2026_d_10", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 41 |
+
{"task": "smallmath-1202", "problem_id": 1202, "stable_id": "mongolia_school_2026_e_12", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 42 |
+
{"task": "smallmath-1636", "problem_id": 1636, "stable_id": "cmm_2026_bee_finals_33", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 43 |
+
{"task": "smallmath-1694", "problem_id": 1694, "stable_id": "ukmcg_2026_02", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 44 |
+
{"task": "smallmath-1731", "problem_id": 1731, "stable_id": "bdmo_2026_1_secondary_07", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 45 |
+
{"task": "smallmath-2500", "problem_id": 2500, "stable_id": "imt_2026_number_theory_07", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 46 |
+
{"task": "smallmath-2520", "problem_id": 2520, "stable_id": "imt_2026_geometry_09", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 47 |
+
{"task": "smallmath-2521", "problem_id": 2521, "stable_id": "imt_2026_geometry_10", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 48 |
+
{"task": "smallmath-3091", "problem_id": 3091, "stable_id": "croatia_regional_a_grade2_2026_05", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 49 |
+
{"task": "smallmath-3384", "problem_id": 3384, "stable_id": "caps_2026_01", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 50 |
+
{"task": "smallmath-3415", "problem_id": 3415, "stable_id": "slovakia_2026_z6_district_01", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 51 |
+
{"task": "smallmath-3421", "problem_id": 3421, "stable_id": "slovakia_2026_z8_district_01", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 52 |
+
{"task": "smallmath-3428", "problem_id": 3428, "stable_id": "slovakia_2026_z9_regional_01", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 53 |
+
{"task": "smallmath-3801", "problem_id": 3801, "stable_id": "kangourou_italy_team_junior_2026_r2_12", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 54 |
+
{"task": "smallmath-3881", "problem_id": 3881, "stable_id": "kangourou_france_2026_b_26", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 55 |
+
{"task": "smallmath-4007", "problem_id": 4007, "stable_id": "finland_matcup_2026_qualifier2_07", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 56 |
+
{"task": "smallmath-4034", "problem_id": 4034, "stable_id": "emo_2026_06", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 57 |
+
{"task": "smallmath-4144", "problem_id": 4144, "stable_id": "canada_repechage_2026_04", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 58 |
+
{"task": "smallmath-4201", "problem_id": 4201, "stable_id": "jarnik_2026_cat2_01", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 59 |
+
{"task": "smallmath-4412", "problem_id": 4412, "stable_id": "estonia_2026_regional_g9_part2_01", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 60 |
+
{"task": "smallmath-4715", "problem_id": 4715, "stable_id": "lehigh_2026_24", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 61 |
+
{"task": "smallmath-4737", "problem_id": 4737, "stable_id": "spain_copa_cangur_2026_junior_final_01", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 62 |
+
{"task": "smallmath-4749", "problem_id": 4749, "stable_id": "spain_copa_cangur_2026_junior_final_13", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 63 |
+
{"task": "smallmath-4766", "problem_id": 4766, "stable_id": "lithuania_2026_selection_05", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 64 |
+
{"task": "smallmath-4769", "problem_id": 4769, "stable_id": "mexico_cnf_2026_level1_02", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 65 |
+
{"task": "smallmath-4770", "problem_id": 4770, "stable_id": "mexico_cnf_2026_level1_03", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 66 |
+
{"task": "smallmath-4788", "problem_id": 4788, "stable_id": "melbourne_2026_senior_07", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 67 |
+
{"task": "smallmath-4807", "problem_id": 4807, "stable_id": "lithuania_2026_junior_g56_06", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 68 |
+
{"task": "smallmath-4820", "problem_id": 4820, "stable_id": "lithuania_2026_team_14", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 69 |
+
{"task": "smallmath-5212", "problem_id": 5212, "stable_id": "paraguay_2026_juvenile_final_2_05", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 70 |
+
{"task": "smallmath-5286", "problem_id": 5286, "stable_id": "lithuania_lpmo_2026_national_g4_10", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 71 |
+
{"task": "smallmath-5336", "problem_id": 5336, "stable_id": "belgium_jwo_2026_r1_25", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 72 |
+
{"task": "smallmath-5453", "problem_id": 5453, "stable_id": "belgium_vwo_2026_r1_21", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 73 |
+
{"task": "smallmath-5891", "problem_id": 5891, "stable_id": "cyprus_olympiad_2026_grades11_12_07", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 74 |
+
{"task": "smallmath-5916", "problem_id": 5916, "stable_id": "vietnam_vms_2026_youth_pt_06", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 75 |
+
{"task": "smallmath-5934", "problem_id": 5934, "stable_id": "ffjm_2026_semifinal_17", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 76 |
+
{"task": "smallmath-6242", "problem_id": 6242, "stable_id": "bulgaria_2026_spring_grade6_01", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 77 |
+
{"task": "smallmath-6359", "problem_id": 6359, "stable_id": "bulgaria_2026_spring_grade9_01_b", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 78 |
+
{"task": "smallmath-6459", "problem_id": 6459, "stable_id": "thailand_ijso_2026_round1_math_03", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 79 |
+
{"task": "smallmath-6488", "problem_id": 6488, "stable_id": "germany_mo_2026_landes65_650833", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 80 |
+
{"task": "smallmath-6915", "problem_id": 6915, "stable_id": "peru_cmb_2026_final_6p_1s_a6", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 81 |
+
{"task": "smallmath-6944", "problem_id": 6944, "stable_id": "peru_cmb_2026_final_4s_5s_b2", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 82 |
+
{"task": "smallmath-7625", "problem_id": 7625, "stable_id": "michigan_math_meet_2026_power_2_1d", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 83 |
+
{"task": "smallmath-7751", "problem_id": 7751, "stable_id": "mit_integration_bee_2026_regular_20", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 84 |
+
{"task": "smallmath-7769", "problem_id": 7769, "stable_id": "mit_integration_bee_2026_final_05", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 85 |
+
{"task": "smallmath-7909", "problem_id": 7909, "stable_id": "spib_2026_round2_grand_tiebreaker_03", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 86 |
+
{"task": "smallmath-7970", "problem_id": 7970, "stable_id": "abmc_2026_october_online_10", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 87 |
+
{"task": "smallmath-8001", "problem_id": 8001, "stable_id": "isi_integration_bee_2026_qualifying_15", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 88 |
+
{"task": "smallmath-8011", "problem_id": 8011, "stable_id": "isi_integration_bee_2026_r4_02", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 89 |
+
{"task": "smallmath-8022", "problem_id": 8022, "stable_id": "uw_math_olympiad_2026_g67_04", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 90 |
+
{"task": "smallmath-8079", "problem_id": 8079, "stable_id": "abmc_2026_onsite_team_r7_01", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 91 |
+
{"task": "smallmath-8112", "problem_id": 8112, "stable_id": "wamo_waime_2026_07", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 92 |
+
{"task": "smallmath-8318", "problem_id": 8318, "stable_id": "unsw_integration_bee_2026_r2_07", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 93 |
+
{"task": "smallmath-8323", "problem_id": 8323, "stable_id": "unsw_integration_bee_2026_sf1_02", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 94 |
+
{"task": "smallmath-8718", "problem_id": 8718, "stable_id": "mat_national_2026_open_statistics_21", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 95 |
+
{"task": "smallmath-9007", "problem_id": 9007, "stable_id": "mat_national_2026_interschool_main_iv_02", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 96 |
+
{"task": "smallmath-9092", "problem_id": 9092, "stable_id": "penn_shanghai_2026_applied_senior_07", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 97 |
+
{"task": "smallmath-9239", "problem_id": 9239, "stable_id": "opg_2026_iii_phase2_10", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 98 |
+
{"task": "smallmath-9243", "problem_id": 9243, "stable_id": "durer_hungary_2026_xix_junior_written_a_04", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 99 |
+
{"task": "smallmath-9914", "problem_id": 9914, "stable_id": "croatia_hmod_2026_d2_02", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
| 100 |
+
{"task": "smallmath-9918", "problem_id": 9918, "stable_id": "croatia_hjmo_2026_d2_02", "level": 4, "difficulty": 4, "answer_kind": "integer"}
|
subsets/level_5.jsonl
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"task": "smallmath-0037", "problem_id": 37, "stable_id": "hmmt_feb_2026_algnt_07", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 2 |
+
{"task": "smallmath-0039", "problem_id": 39, "stable_id": "hmmt_feb_2026_algnt_09", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 3 |
+
{"task": "smallmath-0048", "problem_id": 48, "stable_id": "hmmt_feb_2026_comb_08", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 4 |
+
{"task": "smallmath-0056", "problem_id": 56, "stable_id": "hmmt_feb_2026_geo_06", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 5 |
+
{"task": "smallmath-0057", "problem_id": 57, "stable_id": "hmmt_feb_2026_geo_07", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 6 |
+
{"task": "smallmath-0124", "problem_id": 124, "stable_id": "cmimc_2026_combo_04", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 7 |
+
{"task": "smallmath-0165", "problem_id": 165, "stable_id": "hmmt_feb_2026_guts_20", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 8 |
+
{"task": "smallmath-0179", "problem_id": 179, "stable_id": "hmmt_feb_2026_team_07", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 9 |
+
{"task": "smallmath-0181", "problem_id": 181, "stable_id": "usamo_2026_04", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 10 |
+
{"task": "smallmath-0190", "problem_id": 190, "stable_id": "egmo_2026_01", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 11 |
+
{"task": "smallmath-0195", "problem_id": 195, "stable_id": "balkan_2026_01", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 12 |
+
{"task": "smallmath-0233", "problem_id": 233, "stable_id": "ioqm_2026_m1_22", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 13 |
+
{"task": "smallmath-0330", "problem_id": 330, "stable_id": "bmmt_2026_team_20", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 14 |
+
{"task": "smallmath-0353", "problem_id": 353, "stable_id": "ukmt_cayley_2026_05", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 15 |
+
{"task": "smallmath-0359", "problem_id": 359, "stable_id": "ukmt_hamilton_2026_06", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 16 |
+
{"task": "smallmath-0499", "problem_id": 499, "stable_id": "purplecomet_2026_ms_17", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 17 |
+
{"task": "smallmath-0521", "problem_id": 521, "stable_id": "austria_gwf_2026_3", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 18 |
+
{"task": "smallmath-0538", "problem_id": 538, "stable_id": "dutch_r2_2026_b2", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 19 |
+
{"task": "smallmath-0549", "problem_id": 549, "stable_id": "mathprize_girls_2026_02", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 20 |
+
{"task": "smallmath-0790", "problem_id": 790, "stable_id": "poland_final_2026_02", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 21 |
+
{"task": "smallmath-0797", "problem_id": 797, "stable_id": "germany_bwm_r2_2026_03", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 22 |
+
{"task": "smallmath-0803", "problem_id": 803, "stable_id": "japan_final_2026_03", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 23 |
+
{"task": "smallmath-0829", "problem_id": 829, "stable_id": "taiwan_egmo_prelim_2026_03", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 24 |
+
{"task": "smallmath-0843", "problem_id": 843, "stable_id": "taiwan_tmo_2026_03", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 25 |
+
{"task": "smallmath-0863", "problem_id": 863, "stable_id": "italy_team_final_2026_20", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 26 |
+
{"task": "smallmath-0880", "problem_id": 880, "stable_id": "italy_team_semifinal1_2026_16", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 27 |
+
{"task": "smallmath-0930", "problem_id": 930, "stable_id": "italy_individual_final_2026_06", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 28 |
+
{"task": "smallmath-0952", "problem_id": 952, "stable_id": "obm_2026_l3_03", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 29 |
+
{"task": "smallmath-10865", "problem_id": 10865, "stable_id": "montenegro_oz_2026_s2_03", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 30 |
+
{"task": "smallmath-11164", "problem_id": 11164, "stable_id": "north_macedonia_2026_jmmo_04", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 31 |
+
{"task": "smallmath-11247", "problem_id": 11247, "stable_id": "brazil_omrn_2026_phase1_level3_11", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 32 |
+
{"task": "smallmath-11408", "problem_id": 11408, "stable_id": "serbia_2026_secondary_municipal_b2_02", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 33 |
+
{"task": "smallmath-1157", "problem_id": 1157, "stable_id": "dutch_selection_d_2026_01", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 34 |
+
{"task": "smallmath-1163", "problem_id": 1163, "stable_id": "dutch_selection_e_2026_04", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 35 |
+
{"task": "smallmath-11648", "problem_id": 11648, "stable_id": "brazil_oprm_2026_phase2_level3_05c", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 36 |
+
{"task": "smallmath-1169", "problem_id": 1169, "stable_id": "moscow_grade11_day1_2026_03", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 37 |
+
{"task": "smallmath-11729", "problem_id": 11729, "stable_id": "rmm_2026_01", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 38 |
+
{"task": "smallmath-11740", "problem_id": 11740, "stable_id": "hmmt_nov_2026_gen_07", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 39 |
+
{"task": "smallmath-11763", "problem_id": 11763, "stable_id": "hmmt_nov_2026_team_10", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 40 |
+
{"task": "smallmath-1209", "problem_id": 1209, "stable_id": "mongolia_school_2026_f_07", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 41 |
+
{"task": "smallmath-1648", "problem_id": 1648, "stable_id": "russia_vsosh_final_grade9_2026_01", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 42 |
+
{"task": "smallmath-1667", "problem_id": 1667, "stable_id": "romania_onm_grade6_2026_03", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 43 |
+
{"task": "smallmath-1697", "problem_id": 1697, "stable_id": "ukmcg_2026_05", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 44 |
+
{"task": "smallmath-2119", "problem_id": 2119, "stable_id": "kyrgyzstan_national_2026_senior2_20", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 45 |
+
{"task": "smallmath-2141", "problem_id": 2141, "stable_id": "kmo_2026_first_middle_20", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 46 |
+
{"task": "smallmath-2171", "problem_id": 2171, "stable_id": "kjmo_2026_10", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 47 |
+
{"task": "smallmath-2178", "problem_id": 2178, "stable_id": "kjmo_2026_17", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 48 |
+
{"task": "smallmath-2180", "problem_id": 2180, "stable_id": "kjmo_2026_19", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 49 |
+
{"task": "smallmath-2186", "problem_id": 2186, "stable_id": "serbia_imo_selection_2026_05", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 50 |
+
{"task": "smallmath-2246", "problem_id": 2246, "stable_id": "chantilly_2026_midd_team_11", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 51 |
+
{"task": "smallmath-2302", "problem_id": 2302, "stable_id": "umo_2026_03", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 52 |
+
{"task": "smallmath-2409", "problem_id": 2409, "stable_id": "croatia_national_a_grade3_2026_05", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 53 |
+
{"task": "smallmath-2412", "problem_id": 2412, "stable_id": "croatia_national_a_grade4_2026_03", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 54 |
+
{"task": "smallmath-2451", "problem_id": 2451, "stable_id": "bulgaria_grade8_2026_01", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 55 |
+
{"task": "smallmath-3239", "problem_id": 3239, "stable_id": "croatia_school_a_grade1_2026_07", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 56 |
+
{"task": "smallmath-3409", "problem_id": 3409, "stable_id": "slovakia_regional_c_2026_02", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 57 |
+
{"task": "smallmath-3859", "problem_id": 3859, "stable_id": "finland_grade7_2026_helsinki_final_01b", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 58 |
+
{"task": "smallmath-3982", "problem_id": 3982, "stable_id": "iceland_2026_final_05", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 59 |
+
{"task": "smallmath-4406", "problem_id": 4406, "stable_id": "estonia_2026_regional_g7_part2_04", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 60 |
+
{"task": "smallmath-4409", "problem_id": 4409, "stable_id": "estonia_2026_regional_g8_part2_03", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 61 |
+
{"task": "smallmath-4516", "problem_id": 4516, "stable_id": "mexico_invitation_2026_l4_01", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 62 |
+
{"task": "smallmath-4607", "problem_id": 4607, "stable_id": "estonia_2026_nuputa_g7_07", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 63 |
+
{"task": "smallmath-4665", "problem_id": 4665, "stable_id": "mateclubes_2026_r1_l3_01", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 64 |
+
{"task": "smallmath-4673", "problem_id": 4673, "stable_id": "mateclubes_2026_r1_l5_03", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 65 |
+
{"task": "smallmath-4795", "problem_id": 4795, "stable_id": "southampton_2026_junior_08_c", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 66 |
+
{"task": "smallmath-4946", "problem_id": 4946, "stable_id": "mexico_ommeb_2026_individual_level3_14", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 67 |
+
{"task": "smallmath-5055", "problem_id": 5055, "stable_id": "spain_primavera_2026_phase2_level4_11", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 68 |
+
{"task": "smallmath-5075", "problem_id": 5075, "stable_id": "bulgaria_2026_winter_9_4", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 69 |
+
{"task": "smallmath-5382", "problem_id": 5382, "stable_id": "armenia_young_2026_g5_01", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 70 |
+
{"task": "smallmath-6013", "problem_id": 6013, "stable_id": "ffjm_2026_national_11", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 71 |
+
{"task": "smallmath-6018", "problem_id": 6018, "stable_id": "ffjm_2026_national_16", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 72 |
+
{"task": "smallmath-6052", "problem_id": 6052, "stable_id": "ffjm_2026_international1_07", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 73 |
+
{"task": "smallmath-6056", "problem_id": 6056, "stable_id": "ffjm_2026_international1_11", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 74 |
+
{"task": "smallmath-6175", "problem_id": 6175, "stable_id": "bulgaria_2026_regional_grade10_04", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 75 |
+
{"task": "smallmath-6295", "problem_id": 6295, "stable_id": "germany_mo_2026_school66_660614", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 76 |
+
{"task": "smallmath-6422", "problem_id": 6422, "stable_id": "peru_conemate_2026_national_secondary_16", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 77 |
+
{"task": "smallmath-6456", "problem_id": 6456, "stable_id": "thailand_posn_2026_camp1_30", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 78 |
+
{"task": "smallmath-6494", "problem_id": 6494, "stable_id": "germany_mo_2026_landes65_650935", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 79 |
+
{"task": "smallmath-6604", "problem_id": 6604, "stable_id": "usamts_2026_y38_r1_02", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 80 |
+
{"task": "smallmath-6796", "problem_id": 6796, "stable_id": "peru_cmb_2026_institutional_4s_5s_12", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 81 |
+
{"task": "smallmath-6803", "problem_id": 6803, "stable_id": "germany_berlin_tdm_2026_g910_04", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 82 |
+
{"task": "smallmath-7884", "problem_id": 7884, "stable_id": "spib_2026_round2_quarterfinal_02", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 83 |
+
{"task": "smallmath-7974", "problem_id": 7974, "stable_id": "abmc_2026_october_online_15", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 84 |
+
{"task": "smallmath-7979", "problem_id": 7979, "stable_id": "icmc_2026_team_a2", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 85 |
+
{"task": "smallmath-8016", "problem_id": 8016, "stable_id": "isi_integration_bee_2026_final_02", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 86 |
+
{"task": "smallmath-8062", "problem_id": 8062, "stable_id": "abmc_2026_onsite_accuracy_11", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 87 |
+
{"task": "smallmath-8117", "problem_id": 8117, "stable_id": "wamo_waime_2026_12", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 88 |
+
{"task": "smallmath-8119", "problem_id": 8119, "stable_id": "wamo_waime_2026_14", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 89 |
+
{"task": "smallmath-8120", "problem_id": 8120, "stable_id": "wamo_waime_2026_15", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 90 |
+
{"task": "smallmath-8331", "problem_id": 8331, "stable_id": "penn_philadelphia_2026_intermediate_team_01_2", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 91 |
+
{"task": "smallmath-8591", "problem_id": 8591, "stable_id": "stpetersburg_primary_2026_grade1_08", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 92 |
+
{"task": "smallmath-8690", "problem_id": 8690, "stable_id": "stpetersburg_city_2026_grade6_06", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 93 |
+
{"task": "smallmath-9009", "problem_id": 9009, "stable_id": "mat_national_2026_interschool_main_iv_04", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 94 |
+
{"task": "smallmath-9037", "problem_id": 9037, "stable_id": "matprazdnik_2026_classic_grade7_05", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 95 |
+
{"task": "smallmath-9062", "problem_id": 9062, "stable_id": "moscow_oral_2026_grade7_06", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 96 |
+
{"task": "smallmath-9063", "problem_id": 9063, "stable_id": "moscow_oral_2026_geometry_grades10_11_01", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 97 |
+
{"task": "smallmath-9369", "problem_id": 9369, "stable_id": "durer_hungary_2026_xix_senior_written_e_03", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 98 |
+
{"task": "smallmath-9446", "problem_id": 9446, "stable_id": "durer_hungary_2026_xix_senior_relay_c_15", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 99 |
+
{"task": "smallmath-9447", "problem_id": 9447, "stable_id": "durer_hungary_2026_xix_senior_relay_c_16", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
| 100 |
+
{"task": "smallmath-9562", "problem_id": 9562, "stable_id": "vermont_2026_37", "level": 5, "difficulty": 5, "answer_kind": "integer"}
|
subsets/level_6.jsonl
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"task": "smallmath-0015", "problem_id": 15, "stable_id": "aime_2026_i_15", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 2 |
+
{"task": "smallmath-0030", "problem_id": 30, "stable_id": "aime_2026_ii_15", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 3 |
+
{"task": "smallmath-0047", "problem_id": 47, "stable_id": "hmmt_feb_2026_comb_07", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 4 |
+
{"task": "smallmath-0050", "problem_id": 50, "stable_id": "hmmt_feb_2026_comb_10", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 5 |
+
{"task": "smallmath-0063", "problem_id": 63, "stable_id": "hmmt_feb_2026_team_05", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 6 |
+
{"task": "smallmath-0166", "problem_id": 166, "stable_id": "hmmt_feb_2026_guts_21", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 7 |
+
{"task": "smallmath-0182", "problem_id": 182, "stable_id": "usajmo_2026_02", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 8 |
+
{"task": "smallmath-0183", "problem_id": 183, "stable_id": "imo_2026_03", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 9 |
+
{"task": "smallmath-0185", "problem_id": 185, "stable_id": "usa_tstst_2026_02", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 10 |
+
{"task": "smallmath-0186", "problem_id": 186, "stable_id": "usa_tstst_2026_03", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 11 |
+
{"task": "smallmath-0187", "problem_id": 187, "stable_id": "usa_tstst_2026_04", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 12 |
+
{"task": "smallmath-0206", "problem_id": 206, "stable_id": "inmo_2026_06", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 13 |
+
{"task": "smallmath-0251", "problem_id": 251, "stable_id": "arml_2026_team_10", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 14 |
+
{"task": "smallmath-0365", "problem_id": 365, "stable_id": "ukmt_maclaurin_2026_06", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 15 |
+
{"task": "smallmath-0514", "problem_id": 514, "stable_id": "swiss_final_2026_8", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 16 |
+
{"task": "smallmath-0525", "problem_id": 525, "stable_id": "austria_bwf_2026_3", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 17 |
+
{"task": "smallmath-0567", "problem_id": 567, "stable_id": "mathprize_2026_20", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 18 |
+
{"task": "smallmath-0638", "problem_id": 638, "stable_id": "waterloo_2026_fermat_25", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 19 |
+
{"task": "smallmath-0788", "problem_id": 788, "stable_id": "benelux_2026_04", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 20 |
+
{"task": "smallmath-0825", "problem_id": 825, "stable_id": "bamo_2026_4", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 21 |
+
{"task": "smallmath-0826", "problem_id": 826, "stable_id": "bamo_2026_5", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 22 |
+
{"task": "smallmath-0853", "problem_id": 853, "stable_id": "italy_team_final_2026_09", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 23 |
+
{"task": "smallmath-0858", "problem_id": 858, "stable_id": "italy_team_final_2026_14", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 24 |
+
{"task": "smallmath-0862", "problem_id": 862, "stable_id": "italy_team_final_2026_19", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 25 |
+
{"task": "smallmath-0874", "problem_id": 874, "stable_id": "italy_team_semifinal1_2026_10", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 26 |
+
{"task": "smallmath-0920", "problem_id": 920, "stable_id": "italy_individual_final_2026_05", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 27 |
+
{"task": "smallmath-0934", "problem_id": 934, "stable_id": "philippines_pmo_national_2026_02", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 28 |
+
{"task": "smallmath-10068", "problem_id": 10068, "stable_id": "uwosh_2026_team_05", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 29 |
+
{"task": "smallmath-1057", "problem_id": 1057, "stable_id": "emcc_2026_team_15", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 30 |
+
{"task": "smallmath-1072", "problem_id": 1072, "stable_id": "emcc_2026_guts_15", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 31 |
+
{"task": "smallmath-11107", "problem_id": 11107, "stable_id": "north_macedonia_2026_mmo_05", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 32 |
+
{"task": "smallmath-11179", "problem_id": 11179, "stable_id": "komal_2026_may_b5540", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 33 |
+
{"task": "smallmath-11268", "problem_id": 11268, "stable_id": "vargatamas_2026_final_g8_cat2_05", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 34 |
+
{"task": "smallmath-11340", "problem_id": 11340, "stable_id": "serbia_2026_senior_smo_04", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 35 |
+
{"task": "smallmath-11357", "problem_id": 11357, "stable_id": "brazil_omifce_2026_phase1_level2_17", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 36 |
+
{"task": "smallmath-1136", "problem_id": 1136, "stable_id": "jacob_palis_2026_l3_13", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 37 |
+
{"task": "smallmath-11507", "problem_id": 11507, "stable_id": "bolyai_team_2026_regional_g9_07", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 38 |
+
{"task": "smallmath-1159", "problem_id": 1159, "stable_id": "dutch_selection_d_2026_03", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 39 |
+
{"task": "smallmath-11730", "problem_id": 11730, "stable_id": "vietnam_tst_2026_02", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 40 |
+
{"task": "smallmath-11731", "problem_id": 11731, "stable_id": "china_tst_2026_05", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 41 |
+
{"task": "smallmath-11733", "problem_id": 11733, "stable_id": "china_tst_2026_14", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 42 |
+
{"task": "smallmath-1225", "problem_id": 1225, "stable_id": "mongolia_national_2026_e_01", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 43 |
+
{"task": "smallmath-1520", "problem_id": 1520, "stable_id": "brumo_2026_team_a_09", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 44 |
+
{"task": "smallmath-1531", "problem_id": 1531, "stable_id": "brumo_2026_team_b_10", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 45 |
+
{"task": "smallmath-1583", "problem_id": 1583, "stable_id": "brumo_2026_guts_32", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 46 |
+
{"task": "smallmath-1599", "problem_id": 1599, "stable_id": "cmm_2026_team_4", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 47 |
+
{"task": "smallmath-1655", "problem_id": 1655, "stable_id": "russia_vsosh_final_grade10_2026_04", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 48 |
+
{"task": "smallmath-1658", "problem_id": 1658, "stable_id": "russia_vsosh_final_grade11_2026_04", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 49 |
+
{"task": "smallmath-1661", "problem_id": 1661, "stable_id": "russia_vsosh_final_grade11_2026_08", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 50 |
+
{"task": "smallmath-1701", "problem_id": 1701, "stable_id": "kazakhstan_national_2026_g9_03", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 51 |
+
{"task": "smallmath-1705", "problem_id": 1705, "stable_id": "kazakhstan_national_2026_g10_03", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 52 |
+
{"task": "smallmath-1708", "problem_id": 1708, "stable_id": "imc_university_2026_03", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 53 |
+
{"task": "smallmath-1919", "problem_id": 1919, "stable_id": "clmc_2026_c_04", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 54 |
+
{"task": "smallmath-1920", "problem_id": 1920, "stable_id": "clmc_2026_c_05", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 55 |
+
{"task": "smallmath-1986", "problem_id": 1986, "stable_id": "peru_preigo_2026_avanzado_08", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 56 |
+
{"task": "smallmath-1988", "problem_id": 1988, "stable_id": "peru_preigo_2026_avanzado_10", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 57 |
+
{"task": "smallmath-2036", "problem_id": 2036, "stable_id": "turkey_national_middle_stage1_2026_16", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 58 |
+
{"task": "smallmath-2138", "problem_id": 2138, "stable_id": "kmo_2026_first_middle_17", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 59 |
+
{"task": "smallmath-2154", "problem_id": 2154, "stable_id": "kmo_2026_first_high_13", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 60 |
+
{"task": "smallmath-2160", "problem_id": 2160, "stable_id": "kmo_2026_first_high_19", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 61 |
+
{"task": "smallmath-2161", "problem_id": 2161, "stable_id": "kmo_2026_first_high_20", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 62 |
+
{"task": "smallmath-2165", "problem_id": 2165, "stable_id": "kjmo_2026_04", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 63 |
+
{"task": "smallmath-2403", "problem_id": 2403, "stable_id": "croatia_national_a_grade2_2026_04", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 64 |
+
{"task": "smallmath-2453", "problem_id": 2453, "stable_id": "bulgaria_grade8_2026_03", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 65 |
+
{"task": "smallmath-3978", "problem_id": 3978, "stable_id": "abel_2026_final_2b", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 66 |
+
{"task": "smallmath-4217", "problem_id": 4217, "stable_id": "spain_guadalajara_2026_junior_school_03", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 67 |
+
{"task": "smallmath-4230", "problem_id": 4230, "stable_id": "latvia_2026_final_grade10_04", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 68 |
+
{"task": "smallmath-4260", "problem_id": 4260, "stable_id": "latvia_2026_regional_grade12_04", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 69 |
+
{"task": "smallmath-4374", "problem_id": 4374, "stable_id": "towns_2026_autumn_junior_a_05", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 70 |
+
{"task": "smallmath-4405", "problem_id": 4405, "stable_id": "estonia_2026_regional_g7_part2_03", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 71 |
+
{"task": "smallmath-4432", "problem_id": 4432, "stable_id": "towns_2026_spring_advanced_junior_07", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 72 |
+
{"task": "smallmath-4442", "problem_id": 4442, "stable_id": "towns_2026_spring_ordinary_senior_05", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 73 |
+
{"task": "smallmath-4476", "problem_id": 4476, "stable_id": "spain_thales_2026_granada_primary_team_06", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 74 |
+
{"task": "smallmath-5204", "problem_id": 5204, "stable_id": "hungary_2026_selection4_06", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 75 |
+
{"task": "smallmath-5395", "problem_id": 5395, "stable_id": "armenia_2026_national_g8_05", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 76 |
+
{"task": "smallmath-5912", "problem_id": 5912, "stable_id": "peru_onem_2026_national_level2_01", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 77 |
+
{"task": "smallmath-5931", "problem_id": 5931, "stable_id": "ffjm_2026_semifinal_14", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 78 |
+
{"task": "smallmath-6020", "problem_id": 6020, "stable_id": "ffjm_2026_national_18", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 79 |
+
{"task": "smallmath-6042", "problem_id": 6042, "stable_id": "singapore_smo_2026_senior_r1_22", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 80 |
+
{"task": "smallmath-6109", "problem_id": 6109, "stable_id": "ffjm_2026_international2_16", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 81 |
+
{"task": "smallmath-6158", "problem_id": 6158, "stable_id": "peru_onem_2026_ugel_level2_09", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 82 |
+
{"task": "smallmath-6172", "problem_id": 6172, "stable_id": "bulgaria_2026_regional_grade9_04", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 83 |
+
{"task": "smallmath-6496", "problem_id": 6496, "stable_id": "germany_mo_2026_landes65_650936_b", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 84 |
+
{"task": "smallmath-6753", "problem_id": 6753, "stable_id": "tmt_2026_team_06", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 85 |
+
{"task": "smallmath-7085", "problem_id": 7085, "stable_id": "france_pofm_2026_test5_06", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 86 |
+
{"task": "smallmath-7543", "problem_id": 7543, "stable_id": "lexington_2026_spring_guts_34", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 87 |
+
{"task": "smallmath-7600", "problem_id": 7600, "stable_id": "usemo_2026_western_05", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 88 |
+
{"task": "smallmath-7691", "problem_id": 7691, "stable_id": "yale_gim_2026_individual_11", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 89 |
+
{"task": "smallmath-8111", "problem_id": 8111, "stable_id": "wamo_waime_2026_06", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 90 |
+
{"task": "smallmath-8623", "problem_id": 8623, "stable_id": "ccamb_2026_div2_lightning_s5_01", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 91 |
+
{"task": "smallmath-8624", "problem_id": 8624, "stable_id": "ccamb_2026_div2_lightning_s5_02", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 92 |
+
{"task": "smallmath-8689", "problem_id": 8689, "stable_id": "stpetersburg_city_2026_grade6_05", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 93 |
+
{"task": "smallmath-8696", "problem_id": 8696, "stable_id": "stpetersburg_city_2026_grade9_04", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 94 |
+
{"task": "smallmath-9012", "problem_id": 9012, "stable_id": "mat_national_2026_interschool_main_v_01", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 95 |
+
{"task": "smallmath-9014", "problem_id": 9014, "stable_id": "mat_national_2026_interschool_main_v_03", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 96 |
+
{"task": "smallmath-9015", "problem_id": 9015, "stable_id": "mat_national_2026_interschool_main_v_04", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 97 |
+
{"task": "smallmath-9088", "problem_id": 9088, "stable_id": "cubrmc_2026_team_10", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 98 |
+
{"task": "smallmath-9105", "problem_id": 9105, "stable_id": "euler_russia_2026_final_04", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 99 |
+
{"task": "smallmath-9178", "problem_id": 9178, "stable_id": "ucsd_hmc_2026_part1_17", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
| 100 |
+
{"task": "smallmath-9247", "problem_id": 9247, "stable_id": "durer_hungary_2026_xix_junior_written_b_05", "level": 6, "difficulty": 6, "answer_kind": "integer"}
|
tasks/manifest.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tasks/smallmath-0015/instruction.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Solve the following math problem.
|
| 2 |
+
|
| 3 |
+
Solve with your own reasoning and available tools. Do not look anything up online or call other models or services.
|
| 4 |
+
|
| 5 |
+
Write ONLY your final answer to `/app/answer.txt` (create `/app` if needed). The answer must be one exact number, such as an integer, fraction, or exact expression. Do not include units, words, variables, or a decimal approximation.
|
| 6 |
+
|
| 7 |
+
Problem:
|
| 8 |
+
|
| 9 |
+
Suppose $a, b,$ and $n$ are positive integers, where each of $a$ and $b$ is at least $2$ and at most $2n$. In a $2n \times 2n$ grid of cells, an $a \times b$ cell loop is defined as the collection of $2a + 2b - 4$ cells surrounding an $(a - 2) \times (b - 2)$ rectangle of cells, which may be empty.
|
| 10 |
+
|
| 11 |
+
Determine how many partitions of a $10 \times 10$ grid of cells into $5$ cell loops are possible, with each cell in the grid belonging to exactly one cell loop.
|
tasks/smallmath-0015/solution/solve.sh
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
set -eu
|
| 3 |
+
answer=${ANSWER:-/app/answer.txt}
|
| 4 |
+
mkdir -p "$(dirname "$answer")"
|
| 5 |
+
printf "%s\n" 83 > "$answer"
|
tasks/smallmath-0015/task.toml
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
schema_version = "1.4"
|
| 2 |
+
artifacts = ["/app/answer.txt"]
|
| 3 |
+
|
| 4 |
+
[task]
|
| 5 |
+
name = "smallmath/smallmath-0015"
|
| 6 |
+
version = "0.1.0"
|
| 7 |
+
description = "SmallMath competition problem with an integer answer."
|
| 8 |
+
keywords = ["math", "competition", "integer"]
|
| 9 |
+
|
| 10 |
+
[metadata]
|
| 11 |
+
category = "math"
|
| 12 |
+
source = "MathArena/smallmath@13ef9727659718de8bcba221cfe8f8a65bf88a99"
|
| 13 |
+
problem_id = "15"
|
| 14 |
+
level = 6
|
| 15 |
+
answer_kind = "integer"
|
| 16 |
+
grader_sha256 = "14122999da68091988faedea6b9ba0bc2b25fad38a3ca54158eb52b1cb2ee7ba"
|
| 17 |
+
|
| 18 |
+
[agent]
|
| 19 |
+
network_mode = "allowlist"
|
| 20 |
+
timeout_sec = 3600
|
| 21 |
+
|
| 22 |
+
[environment]
|
| 23 |
+
docker_image = "docker.io/library/python:3.12-slim"
|
| 24 |
+
cpus = 1
|
| 25 |
+
memory_mb = 2048
|
| 26 |
+
|
| 27 |
+
[verifier]
|
| 28 |
+
network_mode = "allowlist"
|
| 29 |
+
timeout_sec = 180
|
tasks/smallmath-0015/tests/grade_task.py
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Grade the answer file against tests/reference.json. Writes reward.txt (1/0), grade.json and a copy of the
|
| 2 |
+
answer (answer.txt) to VERIFIER_DIR. Any error -> reward 0. The sympy/mpmath wheels ship base64-encoded (plain git
|
| 3 |
+
text: the Hub stores binary files in LFS/Xet, which a plain `git checkout` without git-lfs cannot read)."""
|
| 4 |
+
import base64
|
| 5 |
+
import hashlib
|
| 6 |
+
import io
|
| 7 |
+
import json
|
| 8 |
+
import os
|
| 9 |
+
import stat
|
| 10 |
+
import sys
|
| 11 |
+
import tempfile
|
| 12 |
+
import zipfile
|
| 13 |
+
|
| 14 |
+
LIMIT = 10_000 # bytes
|
| 15 |
+
WHEELS = {"sympy-1.14.0-py3-none-any.whl": "e091cc3e99d2141a0ba2847328f5479b05d94a6635cb96148ccb3f34671bd8f5", "mpmath-1.3.0-py3-none-any.whl": "a0b2b9fe80bbcd81a6647ff13108738cfb482d481d826cc0e02f5b35e5c88d2c"}
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
def read_own(path):
|
| 19 |
+
"""Bytes of the regular file at exactly `path`: every folder on the way and the file are opened without
|
| 20 |
+
following links (a FIFO cannot block it); one link only; at most LIMIT bytes."""
|
| 21 |
+
parts = os.path.abspath(path).split("/")[1:]
|
| 22 |
+
folder = os.open("/", os.O_RDONLY | os.O_DIRECTORY)
|
| 23 |
+
try:
|
| 24 |
+
for part in parts[:-1]:
|
| 25 |
+
inner = os.open(part, os.O_RDONLY | os.O_DIRECTORY | os.O_NOFOLLOW, dir_fd=folder)
|
| 26 |
+
os.close(folder)
|
| 27 |
+
folder = inner
|
| 28 |
+
fd = os.open(parts[-1], os.O_RDONLY | os.O_NOFOLLOW | os.O_NONBLOCK, dir_fd=folder)
|
| 29 |
+
finally:
|
| 30 |
+
os.close(folder)
|
| 31 |
+
with os.fdopen(fd, "rb") as stream:
|
| 32 |
+
info = os.fstat(stream.fileno())
|
| 33 |
+
if not stat.S_ISREG(info.st_mode) or info.st_nlink != 1:
|
| 34 |
+
raise ValueError("answer is not a regular file of its own")
|
| 35 |
+
data = stream.read(LIMIT + 1)
|
| 36 |
+
if len(data) > LIMIT:
|
| 37 |
+
raise ValueError(f"answer file larger than {LIMIT} bytes")
|
| 38 |
+
return data
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
def write_new(path, text):
|
| 42 |
+
try:
|
| 43 |
+
os.unlink(path)
|
| 44 |
+
except FileNotFoundError:
|
| 45 |
+
pass
|
| 46 |
+
fd = os.open(path, os.O_WRONLY | os.O_CREAT | os.O_TRUNC | os.O_NOFOLLOW, 0o644)
|
| 47 |
+
with os.fdopen(fd, "w") as stream:
|
| 48 |
+
stream.write(text)
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
def load_grader(tests):
|
| 52 |
+
lib = tempfile.mkdtemp(prefix="grader-lib-")
|
| 53 |
+
for name, digest in WHEELS.items():
|
| 54 |
+
blob = base64.b64decode(open(os.path.join(tests, name + ".b64"), "rb").read())
|
| 55 |
+
if hashlib.sha256(blob).hexdigest() != digest:
|
| 56 |
+
raise ValueError(f"wheel hash mismatch: {name}")
|
| 57 |
+
with zipfile.ZipFile(io.BytesIO(blob)) as z:
|
| 58 |
+
z.extractall(lib)
|
| 59 |
+
sys.path[:0] = [lib, tests]
|
| 60 |
+
import grader
|
| 61 |
+
return grader
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
def main():
|
| 65 |
+
tests, out = os.environ["TESTS_DIR"], os.environ["VERIFIER_DIR"]
|
| 66 |
+
os.makedirs(out, exist_ok=True)
|
| 67 |
+
write_new(os.path.join(out, "reward.txt"), "0")
|
| 68 |
+
passed, why, submission = False, "grader error", ""
|
| 69 |
+
try:
|
| 70 |
+
try:
|
| 71 |
+
submission = read_own(os.environ["ANSWER"]).decode("utf-8", "replace")
|
| 72 |
+
except FileNotFoundError:
|
| 73 |
+
submission, why = None, "no answer file"
|
| 74 |
+
except (OSError, ValueError) as e:
|
| 75 |
+
submission, why = None, f"answer file rejected: {e}"
|
| 76 |
+
if submission is not None:
|
| 77 |
+
write_new(os.path.join(out, "answer.txt"), submission)
|
| 78 |
+
reference = json.loads(open(os.path.join(tests, "reference.json")).read())["answer"]
|
| 79 |
+
grader = load_grader(tests)
|
| 80 |
+
passed, why = grader.grade_safe(reference, submission, timeout=60) if submission.strip() else (False, "empty")
|
| 81 |
+
except Exception as e:
|
| 82 |
+
passed, why = False, f"grader error: {type(e).__name__}: {str(e)[:200]}"
|
| 83 |
+
if passed:
|
| 84 |
+
write_new(os.path.join(out, "reward.txt"), "1")
|
| 85 |
+
write_new(os.path.join(out, "grade.json"), json.dumps({"passed": passed, "why": why, "submission": (submission or "")[:500]}))
|
| 86 |
+
print("reward:", 1 if passed else 0, "|", why)
|
| 87 |
+
|
| 88 |
+
|
| 89 |
+
if __name__ == "__main__":
|
| 90 |
+
main()
|
tasks/smallmath-0015/tests/grader.py
ADDED
|
@@ -0,0 +1,501 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Strict, exact single-number grader for Harbor math tasks (v2).
|
| 2 |
+
|
| 3 |
+
Contract (one uniform instruction for every task): the final answer is ONE exact number, e.g. 42, -7, 3/8,
|
| 4 |
+
\\frac{3}{8}, 2\\sqrt{3}, \\frac{\\pi}{4}. No units, words, variables, "x =", sets, ranges, percent, or approximations.
|
| 5 |
+
|
| 6 |
+
grade(reference, submission) -> (passed: bool, reason: str)
|
| 7 |
+
grade_safe(reference, submission, timeout=10) -> same, run in a memory-capped subprocess (use this in verifiers)
|
| 8 |
+
|
| 9 |
+
How it works
|
| 10 |
+
- Extract: the last top-level \\boxed{...} / \\fbox{...} (brace-matched; a box nested inside the chosen box is
|
| 11 |
+
rejected), else the whole text. Normalize unicode (NFKC, every dash/minus, superscript digits, zero-width chars,
|
| 12 |
+
BOM), strip markdown bold, "Answer:", $..$, \\(..\\), \\[..\\], a trailing period (repeatedly, so "$5$." works),
|
| 13 |
+
\\left. \\right. (null delimiters), \\left/\\right, LaTeX spacing; plain-text forms sqrt(..), pi, ** become LaTeX.
|
| 14 |
+
Digit grouping (1,024 / 1\\,024 / 1 024 / 1{,}024) is removed only when the whole number is grouped in threes.
|
| 15 |
+
0.\\overline{3} becomes 1/3 exactly.
|
| 16 |
+
- Parse with a small recursive-descent parser over a restricted grammar: numbers, + - * / ^, \\frac (also with TeX
|
| 17 |
+
single-token arguments, \\frac12 = 1/2), \\sqrt{x}, \\sqrt[n]{x} (odd roots of negatives are real: \\sqrt[3]{-8} = -2),
|
| 18 |
+
\\pi, \\cdot, \\times, brackets, implicit multiplication. Functions (\\ln/\\log, \\exp/e, \\sin/\\cos/\\tan,
|
| 19 |
+
\\arcsin/\\arccos/\\arctan) are allowed only if the REFERENCE uses their family, so the problem cannot be restated
|
| 20 |
+
instead of solved (\\lfloor, \\binom, factorials, sums: never). Scientific notation (1e5) is off when the reference
|
| 21 |
+
uses the constant e (so "4e+1" means 4e+1). "3\\frac{1}{6}" is a mixed number in a reference and is rejected as
|
| 22 |
+
ambiguous in a submission. "\\sqrt 16" (TeX: sqrt(1)*6) is rejected. 0^0, division by zero, non-real and huge
|
| 23 |
+
values are rejected; written decimals are exact rationals (0.25 = 1/4; 1.41421356 is NOT sqrt 2).
|
| 24 |
+
- Compare EXACTLY, never with a numeric tolerance (a numeric check can only reject, for speed):
|
| 25 |
+
rationals by equality; algebraic numbers by minimal_polynomial(s - g) == x; expressions with pi as polynomials in
|
| 26 |
+
a symbol T with algebraic coefficients (pi is transcendental); anything with ln/e/trig only if sympy simplifies the
|
| 27 |
+
difference to exactly 0. Anything that cannot be proved equal within the time limit fails.
|
| 28 |
+
"""
|
| 29 |
+
import multiprocessing as mp
|
| 30 |
+
import re
|
| 31 |
+
import unicodedata
|
| 32 |
+
|
| 33 |
+
import sympy
|
| 34 |
+
from sympy import Integer, Rational
|
| 35 |
+
|
| 36 |
+
__version__ = "2"
|
| 37 |
+
MAX_LEN = 1000 # characters of the cleaned answer
|
| 38 |
+
MAX_INT_DIGITS = 1000 # digits of any number literal
|
| 39 |
+
MAX_EXPONENT = 3000 # |exponent| allowed in a power or in scientific notation
|
| 40 |
+
MAX_POW_BITS = 100_000 # estimated size of an exact power before computing it
|
| 41 |
+
MEM_LIMIT = 2 << 30 # extra address space allowed to the grade_safe worker (bytes)
|
| 42 |
+
FUNCS = {"ln": sympy.log, "log": sympy.log, "sin": sympy.sin, "cos": sympy.cos, "tan": sympy.tan,
|
| 43 |
+
"arcsin": sympy.asin, "arccos": sympy.acos, "arctan": sympy.atan, "exp": sympy.exp}
|
| 44 |
+
FAMILIES = [{"ln", "log"}, {"exp", "e"}, {"sin", "cos", "tan"}, {"arcsin", "arccos", "arctan"}]
|
| 45 |
+
TRANSCENDENTAL = (sympy.exp, sympy.log, sympy.sin, sympy.cos, sympy.tan, sympy.asin, sympy.acos, sympy.atan)
|
| 46 |
+
_X, _T = sympy.Symbol("x"), sympy.Symbol("T")
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
class Reject(Exception):
|
| 50 |
+
pass
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
# ---------------------------------------------------------------- extraction and cleaning
|
| 54 |
+
_BOX = re.compile(r"\\(?:boxed|fbox)\s*\{")
|
| 55 |
+
_SUPERSCRIPT = str.maketrans("\u2070\u00b9\u00b2\u00b3\u2074\u2075\u2076\u2077\u2078\u2079\u207b", "0123456789-")
|
| 56 |
+
_DASHES = "\u2010\u2011\u2012\u2013\u2014\u2212\ufe63\uff0d"
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
def _last_top_level_box(text: str):
|
| 60 |
+
"""Content of the last \\boxed{..}/\\fbox{..} that is not inside another box; None if there is no box.
|
| 61 |
+
Rejects an unbalanced last box and a box nested inside the chosen box."""
|
| 62 |
+
spans, i = [], 0
|
| 63 |
+
while True:
|
| 64 |
+
m = _BOX.search(text, i)
|
| 65 |
+
if not m:
|
| 66 |
+
break
|
| 67 |
+
depth, j = 1, m.end()
|
| 68 |
+
while j < len(text) and depth:
|
| 69 |
+
depth += {"{": 1, "}": -1}.get(text[j], 0)
|
| 70 |
+
j += 1
|
| 71 |
+
if depth:
|
| 72 |
+
raise Reject("unbalanced \\boxed")
|
| 73 |
+
spans.append((m.end(), j - 1))
|
| 74 |
+
i = j # continue AFTER this box: inner boxes are not top level
|
| 75 |
+
if not spans:
|
| 76 |
+
return None
|
| 77 |
+
a, b = spans[-1]
|
| 78 |
+
inner = text[a:b]
|
| 79 |
+
if _BOX.search(inner):
|
| 80 |
+
raise Reject("box inside box")
|
| 81 |
+
return inner
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
def _normalize_unicode(t: str) -> str:
|
| 85 |
+
t = re.sub("[\ufeff\u200b\u200c\u200d\u2060\u00ad]", "", t)
|
| 86 |
+
t = re.sub("[\u2070\u00b9\u00b2\u00b3\u2074-\u2079\u207b]+", lambda m: "^{" + m.group().translate(_SUPERSCRIPT) + "}", t)
|
| 87 |
+
for ch in _DASHES:
|
| 88 |
+
t = t.replace(ch, "-")
|
| 89 |
+
t = t.replace("\u00d7", "\\times ").replace("\u00b7", "\\cdot ").replace("\u22c5", "\\cdot ")
|
| 90 |
+
t = t.replace("\u03c0", "\\pi ").replace("\u221a", "\\sqrt")
|
| 91 |
+
return unicodedata.normalize("NFKC", t)
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
def _repeating(m) -> str:
|
| 95 |
+
whole, fixed, rep = m.group(1) or "0", m.group(2), m.group(3)
|
| 96 |
+
num = Integer(int(fixed + rep)) - Integer(int(fixed or "0"))
|
| 97 |
+
den = Integer(10) ** len(fixed) * (Integer(10) ** len(rep) - 1)
|
| 98 |
+
v = Integer(int(whole)) + num / den
|
| 99 |
+
return f"(\\frac{{{v.p}}}{{{v.q}}})"
|
| 100 |
+
|
| 101 |
+
|
| 102 |
+
_NOT_UNIT = re.compile(r"\b(?:or|and|to|for|if|is|not|no|none|either|approx|about|between|each|where|with)\b", re.I)
|
| 103 |
+
_UNIT_TEXT = re.compile(r"\s*\\(?:text|mathrm|mbox|textrm|operatorname)\s*\{\s*([A-Za-z][A-Za-z ./^0-9-]{0,24})\}\s*$")
|
| 104 |
+
_UNIT_WORD = re.compile(r"(?<=[\d})])\s+([A-Za-z]{2,12}(?:\s?/\s?[A-Za-z]{1,8})?(?:\^\{?\d\}?)?)\s*$")
|
| 105 |
+
_DEGREES = re.compile(r"\s*(?:\^\s*\{?\s*\\circ\s*\}?|°|\\degree)\s*$")
|
| 106 |
+
_LHS = re.compile(r"^\s*[A-Za-z](?:_\{?[A-Za-z0-9]+\}?)?\s*=\s*(?=[^=]+$)")
|
| 107 |
+
|
| 108 |
+
|
| 109 |
+
def strip_wrappers(t: str) -> str:
|
| 110 |
+
"""Remove a wrapper around ONE value: trailing units (30 ft/s, 111 meters, \\sqrt{109}\\text{ m}), a degree sign,
|
| 111 |
+
or a single 'n =' prefix. Hedges ('32 \\text{ or } 33'), approximations and multi-part answers are untouched."""
|
| 112 |
+
prev = None
|
| 113 |
+
while t != prev:
|
| 114 |
+
prev = t
|
| 115 |
+
m = _UNIT_TEXT.search(t)
|
| 116 |
+
if m and not _NOT_UNIT.search(m.group(1)) and t[:m.start()].strip():
|
| 117 |
+
t = t[:m.start()].rstrip()
|
| 118 |
+
m = _UNIT_WORD.search(t)
|
| 119 |
+
if m and not _NOT_UNIT.search(m.group(1)):
|
| 120 |
+
t = t[:m.start()].rstrip()
|
| 121 |
+
if t[:-1].strip():
|
| 122 |
+
t = _DEGREES.sub("", t).rstrip()
|
| 123 |
+
t = _LHS.sub("", t)
|
| 124 |
+
return t
|
| 125 |
+
|
| 126 |
+
|
| 127 |
+
def clean(text: str) -> str:
|
| 128 |
+
t = _normalize_unicode((text or "").strip())
|
| 129 |
+
boxed = _last_top_level_box(t)
|
| 130 |
+
if boxed is not None:
|
| 131 |
+
t = boxed
|
| 132 |
+
prev = None
|
| 133 |
+
while t != prev: # peel wrappers in any order: "**Answer:** $5$." -> 5
|
| 134 |
+
prev = t
|
| 135 |
+
t = t.strip()
|
| 136 |
+
t = re.sub(r"^(\*\*|__)(.*)\1$", r"\2", t, flags=re.S).strip()
|
| 137 |
+
t = re.sub(r"^\**\s*(?:the\s+)?(?:final\s+)?answer\s*(?:is)?\s*[:=]?\s*\**\s*", "", t, flags=re.I).strip()
|
| 138 |
+
for a, b in (("$$", "$$"), ("$", "$"), ("\\(", "\\)"), ("\\[", "\\]")):
|
| 139 |
+
if t.startswith(a) and t.endswith(b) and len(t) > len(a) + len(b):
|
| 140 |
+
t = t[len(a):-len(b)].strip()
|
| 141 |
+
t = t.rstrip(". ").strip()
|
| 142 |
+
t = re.sub(r"\\(?:left|right)\.", "", t) # null delimiters
|
| 143 |
+
t = re.sub(r"\\(?:displaystyle|left|right|bigl|bigr|Bigl|Bigr|big|Big)(?![A-Za-z])", "", t)
|
| 144 |
+
t = re.sub(r"\\mathrm\{e\}|\\mathit\{e\}", "e", t)
|
| 145 |
+
t = re.sub(r"\\[dtc]frac(?![A-Za-z])", r"\\frac", t)
|
| 146 |
+
t = re.sub(r"(\d*)\.(\d*)\\overline\{(\d+)\}", _repeating, t)
|
| 147 |
+
t = re.sub(r"(?<=\d)\\[,;! ](?=\d{3}(?!\d))", "", t) # 2\,560\,320 -> 2560320
|
| 148 |
+
t = re.sub(r"\\[,;:! ]|~", " ", t)
|
| 149 |
+
t = strip_wrappers(t) # 30 ft/s, n = 24^5, 30° -> the bare value
|
| 150 |
+
t = re.sub(r"(?<=\d)\s*\{,\}\s*(?=\d{3}(?!\d))", "", t) # 3{,}100
|
| 151 |
+
if re.fullmatch(r"\s*-?\d{1,3}([, ]\d{3})+(\.\d+)?\s*", t) and len(set(re.findall(r"[, ]", t.strip()))) == 1:
|
| 152 |
+
t = re.sub(r"[, ]", "", t) # 3,100 / 1,000.5 / 1 000 (one separator kind)
|
| 153 |
+
t = t.replace("**", "^") # python power
|
| 154 |
+
t = re.sub(r"(?<![\\A-Za-z])sqrt\s*(?=[({])", r"\\sqrt", t) # sqrt(2) -> \sqrt(2)
|
| 155 |
+
t = re.sub(r"(?<![\\A-Za-z])pi(?![A-Za-z])", r"\\pi ", t) # pi/4 -> \pi/4
|
| 156 |
+
return re.sub(r"\s+", " ", t).strip()
|
| 157 |
+
|
| 158 |
+
|
| 159 |
+
# ---------------------------------------------------------------- parser
|
| 160 |
+
TOKEN = re.compile(r"\s*(?:(?P<num>\d+\.\d*|\.\d+|\d+)(?:[eE](?P<exp>[+-]?\d+))?|(?P<cmd>\\[A-Za-z]+)|(?P<sym>[-+*/^(){}\[\]])|(?P<let>[A-Za-z]))")
|
| 161 |
+
NUM_ONLY = re.compile(r"\s*(?P<num>\d+\.\d*|\.\d+|\d+)")
|
| 162 |
+
|
| 163 |
+
|
| 164 |
+
def tokenize(s: str, sci: bool = True):
|
| 165 |
+
"""Tokens are (kind, value, raw). sci=False turns scientific notation off (the reference uses the constant e)."""
|
| 166 |
+
out, pos = [], 0
|
| 167 |
+
while pos < len(s):
|
| 168 |
+
m = TOKEN.match(s, pos)
|
| 169 |
+
if m and not sci and m.group("num") is not None and m.group("exp") is not None:
|
| 170 |
+
m = NUM_ONLY.match(s, pos) # "4e+1" -> 4, e, +, 1
|
| 171 |
+
if not m or m.end() == pos:
|
| 172 |
+
if s[pos:].strip() == "":
|
| 173 |
+
break
|
| 174 |
+
raise Reject(f"unexpected character {s[pos]!r}")
|
| 175 |
+
pos = m.end()
|
| 176 |
+
if m.group("num") is not None:
|
| 177 |
+
num = m.group("num")
|
| 178 |
+
if len(num.replace(".", "")) > MAX_INT_DIGITS:
|
| 179 |
+
raise Reject("number too long")
|
| 180 |
+
val = Rational(num) if "." in num else Integer(int(num))
|
| 181 |
+
exp = m.groupdict().get("exp")
|
| 182 |
+
if exp is not None:
|
| 183 |
+
if abs(int(exp)) > MAX_EXPONENT:
|
| 184 |
+
raise Reject("exponent too large")
|
| 185 |
+
val = val * Rational(10) ** int(exp)
|
| 186 |
+
out.append(("num", val, m.group(0).strip()))
|
| 187 |
+
elif m.group("cmd"):
|
| 188 |
+
out.append(("cmd", m.group("cmd")[1:], m.group("cmd")))
|
| 189 |
+
elif m.group("sym"):
|
| 190 |
+
out.append(("sym", m.group("sym"), m.group("sym")))
|
| 191 |
+
else:
|
| 192 |
+
out.append(("let", m.group("let"), m.group("let")))
|
| 193 |
+
return out
|
| 194 |
+
|
| 195 |
+
|
| 196 |
+
def _mixed_numbers(tokens, is_reference: bool):
|
| 197 |
+
"""N\\frac{a}{b} with integer literals N, a, b: a mixed number (N + a/b) in a reference; ambiguous in a submission."""
|
| 198 |
+
out, i = [], 0
|
| 199 |
+
pat = ["num", ("cmd", "frac"), ("sym", "{"), "num", ("sym", "}"), ("sym", "{"), "num", ("sym", "}")]
|
| 200 |
+
while i < len(tokens):
|
| 201 |
+
win = tokens[i:i + 8]
|
| 202 |
+
ok = len(win) == 8 and all((w[0] == p) if isinstance(p, str) else (w[0], w[1]) == p for w, p in zip(win, pat))
|
| 203 |
+
ok = ok and all(win[k][2].isdigit() for k in (0, 3, 6))
|
| 204 |
+
prev = out[-1] if out else None
|
| 205 |
+
if ok and not (prev and (prev[0] == "cmd" or prev[:2] == ("sym", "^"))):
|
| 206 |
+
if not is_reference:
|
| 207 |
+
raise Reject("ambiguous mixed number (write 7/2, not 3\\frac{1}{2})")
|
| 208 |
+
if win[6][1] == 0:
|
| 209 |
+
raise Reject("division by zero")
|
| 210 |
+
out.append(("num", win[0][1] + win[3][1] / win[6][1], "mixed"))
|
| 211 |
+
i += 8
|
| 212 |
+
continue
|
| 213 |
+
out.append(tokens[i]); i += 1
|
| 214 |
+
return out
|
| 215 |
+
|
| 216 |
+
|
| 217 |
+
def _nonzero(d):
|
| 218 |
+
"""Reject a zero divisor, including a disguised one (sqrt(3+2sqrt2)-1-sqrt2). Numeric check: reject-only."""
|
| 219 |
+
if d == 0 or d.is_zero:
|
| 220 |
+
raise Reject("division by zero")
|
| 221 |
+
if not d.is_Rational:
|
| 222 |
+
try:
|
| 223 |
+
v = sympy.N(d, 60)
|
| 224 |
+
except Exception:
|
| 225 |
+
raise Reject("cannot evaluate divisor")
|
| 226 |
+
if not v.is_Number or abs(v) < sympy.Float("1e-45", 60):
|
| 227 |
+
raise Reject("division by (numerically) zero")
|
| 228 |
+
return d
|
| 229 |
+
|
| 230 |
+
|
| 231 |
+
def _pow_bits(expr) -> int:
|
| 232 |
+
return sum(abs(int(r.p)).bit_length() + int(r.q).bit_length() for r in expr.atoms(sympy.Rational)) or 1
|
| 233 |
+
|
| 234 |
+
|
| 235 |
+
class Parser:
|
| 236 |
+
"""expr := term (('+'|'-') term)* ; term := unary (('*'|'/'|implicit) unary)* ; unary := ('-'|'+') unary | power
|
| 237 |
+
power := atom ('^' exponent)? ; atom := number | group | \\frac A A | \\sqrt[n] A | \\pi | e | func arg"""
|
| 238 |
+
|
| 239 |
+
def __init__(self, tokens, allowed):
|
| 240 |
+
self.t, self.i, self.allowed = list(tokens), 0, allowed
|
| 241 |
+
|
| 242 |
+
def peek(self):
|
| 243 |
+
return self.t[self.i][:2] if self.i < len(self.t) else (None, None)
|
| 244 |
+
|
| 245 |
+
def take(self, kind=None, val=None):
|
| 246 |
+
k, v = self.peek()
|
| 247 |
+
if k is None or (kind and k != kind) or (val is not None and v != val):
|
| 248 |
+
raise Reject(f"malformed near token {self.i}")
|
| 249 |
+
self.i += 1
|
| 250 |
+
return v
|
| 251 |
+
|
| 252 |
+
def parse(self):
|
| 253 |
+
if not self.t:
|
| 254 |
+
raise Reject("empty")
|
| 255 |
+
e = self.expr()
|
| 256 |
+
if self.i != len(self.t):
|
| 257 |
+
raise Reject("trailing input")
|
| 258 |
+
return e
|
| 259 |
+
|
| 260 |
+
def expr(self):
|
| 261 |
+
v = self.term()
|
| 262 |
+
while self.peek() in (("sym", "+"), ("sym", "-")):
|
| 263 |
+
op = self.take()
|
| 264 |
+
r = self.term()
|
| 265 |
+
v = v + r if op == "+" else v - r
|
| 266 |
+
return v
|
| 267 |
+
|
| 268 |
+
def starts_atom(self):
|
| 269 |
+
k, v = self.peek()
|
| 270 |
+
return k == "num" or (k == "sym" and v in "({[") or (k == "cmd" and v in ({"frac", "sqrt", "pi"} | self.allowed)) \
|
| 271 |
+
or (k == "let" and v == "e" and "e" in self.allowed)
|
| 272 |
+
|
| 273 |
+
def term(self):
|
| 274 |
+
v = self.unary()
|
| 275 |
+
while True:
|
| 276 |
+
k, s = self.peek()
|
| 277 |
+
if (k, s) in (("sym", "*"), ("cmd", "cdot"), ("cmd", "times")):
|
| 278 |
+
self.take(); v = v * self.unary()
|
| 279 |
+
elif (k, s) == ("sym", "/"):
|
| 280 |
+
self.take(); v = v / _nonzero(self.unary())
|
| 281 |
+
elif self.starts_atom():
|
| 282 |
+
if self.peek()[0] == "num":
|
| 283 |
+
raise Reject("two numbers side by side") # "2 100" or "\sqrt 16" is malformed, not a product
|
| 284 |
+
v = v * self.power() # implicit multiplication: 2\sqrt{3}, 3\pi, 2(1+x)
|
| 285 |
+
else:
|
| 286 |
+
return v
|
| 287 |
+
|
| 288 |
+
def unary(self):
|
| 289 |
+
if self.peek() == ("sym", "-"):
|
| 290 |
+
self.take(); return -self.unary()
|
| 291 |
+
if self.peek() == ("sym", "+"):
|
| 292 |
+
self.take(); return self.unary()
|
| 293 |
+
return self.power()
|
| 294 |
+
|
| 295 |
+
def power(self):
|
| 296 |
+
base = self.atom()
|
| 297 |
+
if self.peek() != ("sym", "^"):
|
| 298 |
+
return base
|
| 299 |
+
self.take()
|
| 300 |
+
if self.peek() == ("sym", "{"):
|
| 301 |
+
exp = self.group()
|
| 302 |
+
elif self.peek() in (("sym", "-"), ("sym", "+")):
|
| 303 |
+
sign = -1 if self.take() == "-" else 1 # 2^-1
|
| 304 |
+
exp = sign * self.atom()
|
| 305 |
+
else:
|
| 306 |
+
exp = self.atom()
|
| 307 |
+
if self.peek() == ("sym", "^"):
|
| 308 |
+
raise Reject("power tower")
|
| 309 |
+
return self._pow(base, exp)
|
| 310 |
+
|
| 311 |
+
def _pow(self, base, exp):
|
| 312 |
+
if not exp.is_number or exp.is_real is False:
|
| 313 |
+
raise Reject("non-numeric exponent")
|
| 314 |
+
if not exp.is_Rational:
|
| 315 |
+
if base == sympy.E and "e" in self.allowed and abs(sympy.N(exp, 15)) <= MAX_EXPONENT:
|
| 316 |
+
return sympy.exp(exp) # e^{\ln 2}
|
| 317 |
+
raise Reject("irrational exponent not supported")
|
| 318 |
+
if abs(exp) > MAX_EXPONENT:
|
| 319 |
+
raise Reject("exponent too large")
|
| 320 |
+
if base == 0 and exp <= 0:
|
| 321 |
+
raise Reject("0^0 or division by zero")
|
| 322 |
+
if exp < 0:
|
| 323 |
+
_nonzero(base)
|
| 324 |
+
if _pow_bits(base) * max(1, abs(int(exp.p))) > MAX_POW_BITS:
|
| 325 |
+
raise Reject("value too large")
|
| 326 |
+
if base.is_negative and exp.q % 2 == 1 and exp.q > 1:
|
| 327 |
+
return (-1) ** exp.p * (-base) ** exp # real odd root: (-8)^{1/3} = -2
|
| 328 |
+
return base ** exp
|
| 329 |
+
|
| 330 |
+
def group(self):
|
| 331 |
+
open_ = self.take("sym")
|
| 332 |
+
close = {"(": ")", "[": "]", "{": "}"}.get(open_)
|
| 333 |
+
if close is None:
|
| 334 |
+
raise Reject("unexpected symbol")
|
| 335 |
+
v = self.expr()
|
| 336 |
+
self.take("sym", close)
|
| 337 |
+
return v
|
| 338 |
+
|
| 339 |
+
def arg(self):
|
| 340 |
+
"""A TeX macro argument: {..}, (..) / [..] (plain-text style), or ONE token (\\frac12, \\frac\\pi4, \\sqrt2)."""
|
| 341 |
+
k, v = self.peek()
|
| 342 |
+
if k == "sym" and v in "{([":
|
| 343 |
+
return self.group()
|
| 344 |
+
if k == "num":
|
| 345 |
+
raw = self.t[self.i][2]
|
| 346 |
+
if not raw.isdigit():
|
| 347 |
+
raise Reject("ambiguous unbraced argument")
|
| 348 |
+
if len(raw) == 1:
|
| 349 |
+
self.i += 1
|
| 350 |
+
return v
|
| 351 |
+
self.t[self.i] = ("num", Integer(int(raw[1:])), raw[1:]) # TeX takes one digit: \frac12 = 1/2
|
| 352 |
+
return Integer(int(raw[0]))
|
| 353 |
+
if (k == "cmd" and v == "pi") or (k == "let" and v == "e" and "e" in self.allowed):
|
| 354 |
+
return self.atom()
|
| 355 |
+
raise Reject("ambiguous unbraced argument")
|
| 356 |
+
|
| 357 |
+
def atom(self):
|
| 358 |
+
k, v = self.peek()
|
| 359 |
+
if k == "num":
|
| 360 |
+
self.take(); return v
|
| 361 |
+
if k == "sym" and v in "({[":
|
| 362 |
+
return self.group()
|
| 363 |
+
if k == "let" and v == "e" and "e" in self.allowed:
|
| 364 |
+
self.take(); return sympy.E
|
| 365 |
+
if k == "cmd":
|
| 366 |
+
self.take()
|
| 367 |
+
if v == "frac":
|
| 368 |
+
n, d = self.arg(), self.arg()
|
| 369 |
+
return n / _nonzero(d)
|
| 370 |
+
if v == "sqrt":
|
| 371 |
+
if self.peek() == ("sym", "["):
|
| 372 |
+
self.take(); idx = self.expr(); self.take("sym", "]")
|
| 373 |
+
if not (idx.is_Integer and 2 <= idx <= 50):
|
| 374 |
+
raise Reject("bad root index")
|
| 375 |
+
return self._pow(self.arg(), Rational(1, int(idx)))
|
| 376 |
+
return self._pow(self.arg(), Rational(1, 2))
|
| 377 |
+
if v == "pi":
|
| 378 |
+
return sympy.pi
|
| 379 |
+
if v in FUNCS and v in self.allowed:
|
| 380 |
+
if self.peek() in (("sym", "{"), ("sym", "("), ("sym", "[")):
|
| 381 |
+
a = self.group()
|
| 382 |
+
else:
|
| 383 |
+
a = self.power()
|
| 384 |
+
return FUNCS[v](a)
|
| 385 |
+
raise Reject(f"\\{v} not allowed")
|
| 386 |
+
if k == "let":
|
| 387 |
+
raise Reject(f"variable or word {v!r}")
|
| 388 |
+
raise Reject("malformed")
|
| 389 |
+
|
| 390 |
+
|
| 391 |
+
def allowed_from_reference(ref_clean: str) -> set:
|
| 392 |
+
allowed = {c for c in FUNCS if re.search(r"\\" + c + r"(?![A-Za-z])", ref_clean)}
|
| 393 |
+
if re.search(r"(?<![A-Za-z\\])e(?![A-Za-z])", re.sub(r"\\[A-Za-z]+", "", ref_clean)):
|
| 394 |
+
allowed.add("e")
|
| 395 |
+
for fam in FAMILIES:
|
| 396 |
+
if allowed & fam:
|
| 397 |
+
allowed |= fam
|
| 398 |
+
return allowed
|
| 399 |
+
|
| 400 |
+
|
| 401 |
+
def value(text: str, allowed: set, is_reference: bool = False):
|
| 402 |
+
t = clean(text)
|
| 403 |
+
if not t:
|
| 404 |
+
raise Reject("empty")
|
| 405 |
+
if len(t) > MAX_LEN:
|
| 406 |
+
raise Reject("answer too long")
|
| 407 |
+
if re.search(r"\\(?:text|mathrm|mathbf|operatorname|boxed|fbox)\{|\\%|%|\\approx|\\pm|\\mp|=|<|>|\\le|\\ge|\\ne|\\in(?![A-Za-z])|\\infty|\\circ|°|,", t):
|
| 408 |
+
raise Reject("not a single exact number (units/text/relation/percent/approximation/list)")
|
| 409 |
+
tokens = _mixed_numbers(tokenize(t, sci="e" not in allowed), is_reference)
|
| 410 |
+
v = Parser(tokens, allowed).parse()
|
| 411 |
+
if v.has(sympy.zoo, sympy.oo, -sympy.oo, sympy.nan) or v.is_finite is False:
|
| 412 |
+
raise Reject("non-finite value")
|
| 413 |
+
if v.is_real is False:
|
| 414 |
+
raise Reject("not a real number")
|
| 415 |
+
return v
|
| 416 |
+
|
| 417 |
+
|
| 418 |
+
def _is_transcendental(expr) -> bool:
|
| 419 |
+
return expr.has(sympy.E) or any(expr.has(f) for f in TRANSCENDENTAL)
|
| 420 |
+
|
| 421 |
+
|
| 422 |
+
def exact_equal(s, g) -> bool:
|
| 423 |
+
"""True only if s == g is PROVED. Numeric evaluation is used to reject quickly, never to accept."""
|
| 424 |
+
if s.is_Rational and g.is_Rational:
|
| 425 |
+
return s == g
|
| 426 |
+
d = s - g
|
| 427 |
+
if d == 0:
|
| 428 |
+
return True
|
| 429 |
+
try:
|
| 430 |
+
dv, gv = sympy.N(d, 50), sympy.N(g, 50)
|
| 431 |
+
if dv.is_Number and gv.is_Number and abs(dv) > sympy.Float("1e-30", 50) * max(1, abs(gv)):
|
| 432 |
+
return False
|
| 433 |
+
except Exception:
|
| 434 |
+
pass
|
| 435 |
+
if _is_transcendental(d): # ln / e / trig: only an exact simplification to 0 counts
|
| 436 |
+
for cand in (sympy.expand_log(d), d):
|
| 437 |
+
try:
|
| 438 |
+
if sympy.simplify(cand) == 0:
|
| 439 |
+
return True
|
| 440 |
+
except Exception:
|
| 441 |
+
pass
|
| 442 |
+
return False
|
| 443 |
+
if d.has(sympy.pi): # pi is transcendental: d == 0 iff every coefficient in T is 0
|
| 444 |
+
num = sympy.together(sympy.expand(d.subs(sympy.pi, _T))).as_numer_denom()[0]
|
| 445 |
+
poly = sympy.Poly(sympy.expand(num), _T)
|
| 446 |
+
return all(sympy.minimal_polynomial(c, _X) == _X for c in poly.coeffs())
|
| 447 |
+
return sympy.minimal_polynomial(d, _X) == _X
|
| 448 |
+
|
| 449 |
+
|
| 450 |
+
def grade(reference: str, submission: str):
|
| 451 |
+
try:
|
| 452 |
+
ref_clean = clean(reference)
|
| 453 |
+
allowed = allowed_from_reference(ref_clean)
|
| 454 |
+
g = value(reference, allowed, is_reference=True)
|
| 455 |
+
except Reject as e:
|
| 456 |
+
return False, f"reference unusable: {e}"
|
| 457 |
+
except Exception as e:
|
| 458 |
+
return False, f"reference unusable: {type(e).__name__}"
|
| 459 |
+
try:
|
| 460 |
+
s = value(submission, allowed)
|
| 461 |
+
except Reject as e:
|
| 462 |
+
return False, f"format: {e}"
|
| 463 |
+
except (RecursionError, ValueError, TypeError, ZeroDivisionError, OverflowError) as e:
|
| 464 |
+
return False, f"format: {type(e).__name__}"
|
| 465 |
+
try:
|
| 466 |
+
ok = exact_equal(s, g)
|
| 467 |
+
except Exception as e:
|
| 468 |
+
return False, f"could not prove equal ({type(e).__name__})"
|
| 469 |
+
return (True, "exact match") if ok else (False, "wrong value")
|
| 470 |
+
|
| 471 |
+
|
| 472 |
+
def _worker(q, reference, submission):
|
| 473 |
+
try:
|
| 474 |
+
import resource # cap = current address space + MEM_LIMIT (an absolute cap breaks
|
| 475 |
+
vm = 0 # workers forked from big parents: they hang instead of grading)
|
| 476 |
+
for line in open("/proc/self/status"):
|
| 477 |
+
if line.startswith("VmSize:"):
|
| 478 |
+
vm = int(line.split()[1]) * 1024
|
| 479 |
+
resource.setrlimit(resource.RLIMIT_AS, (vm + MEM_LIMIT, vm + MEM_LIMIT))
|
| 480 |
+
except Exception:
|
| 481 |
+
pass
|
| 482 |
+
try:
|
| 483 |
+
q.put(grade(reference, submission))
|
| 484 |
+
except MemoryError:
|
| 485 |
+
q.put((False, "grader out of memory"))
|
| 486 |
+
except Exception as e:
|
| 487 |
+
q.put((False, f"grader error: {type(e).__name__}"))
|
| 488 |
+
|
| 489 |
+
|
| 490 |
+
def grade_safe(reference: str, submission: str, timeout: float = 10.0):
|
| 491 |
+
ctx = mp.get_context("fork")
|
| 492 |
+
q = ctx.Queue()
|
| 493 |
+
p = ctx.Process(target=_worker, args=(q, reference, submission))
|
| 494 |
+
p.start(); p.join(timeout)
|
| 495 |
+
if p.is_alive():
|
| 496 |
+
p.kill(); p.join()
|
| 497 |
+
return False, "timeout"
|
| 498 |
+
try:
|
| 499 |
+
return q.get(timeout=1)
|
| 500 |
+
except Exception:
|
| 501 |
+
return False, "grader crashed"
|
tasks/smallmath-0015/tests/mpmath-1.3.0-py3-none-any.whl.b64
ADDED
|
Binary file (715 kB). View file
|
|
|
tasks/smallmath-0015/tests/reference.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"answer": "83"}
|
tasks/smallmath-0015/tests/sympy-1.14.0-py3-none-any.whl.b64
ADDED
|
Binary file (8.4 MB). View file
|
|
|
tasks/smallmath-0015/tests/test.sh
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
# Reward 1 if /app/answer.txt holds one exact number equal to the hidden reference (grader.py, exact sympy proof).
|
| 3 |
+
# 0 is written before anything runs, so a crash, a timeout or a missing/linked/oversized answer scores 0.
|
| 4 |
+
# Python runs isolated (-I -S); sympy/mpmath come from the pinned wheels in this directory (hash-checked, unpacked
|
| 5 |
+
# offline into a new directory): nothing is installed and no network is used. ANSWER and VERIFIER_DIR override
|
| 6 |
+
# the paths, to test the grader locally.
|
| 7 |
+
case $0 in */*) here=${0%/*} ;; *) here=. ;; esac
|
| 8 |
+
export ANSWER=${ANSWER:-/app/answer.txt}
|
| 9 |
+
export VERIFIER_DIR=${VERIFIER_DIR:-/logs/verifier}
|
| 10 |
+
export TESTS_DIR=$here
|
| 11 |
+
[ -d "$VERIFIER_DIR" ] && echo 0 > "$VERIFIER_DIR/reward.txt"
|
| 12 |
+
timeout 150 python3 -B -I -S "$here/grade_task.py" || true
|
tasks/smallmath-0030/instruction.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Solve the following math problem.
|
| 2 |
+
|
| 3 |
+
Solve with your own reasoning and available tools. Do not look anything up online or call other models or services.
|
| 4 |
+
|
| 5 |
+
Write ONLY your final answer to `/app/answer.txt` (create `/app` if needed). The answer must be one exact number, such as an integer, fraction, or exact expression. Do not include units, words, variables, or a decimal approximation.
|
| 6 |
+
|
| 7 |
+
Problem:
|
| 8 |
+
|
| 9 |
+
How many ordered 7-tuples $(a_1, a_2, a_3, \ldots, a_7)$ satisfy all of these conditions? - Each entry satisfies $a_k \in \{1,2,3\}$ for every $k.$ - The sum $a_1+a_2+a_3+a_4+a_5+a_6+a_7$ is divisible by $3.$ - The expression $a_1a_2 a_4 + a_2a_3a_5 + a_3a_4 a_6 + a_4 a_5 a_7 + a_5 a_6 a_1 + a_6 a_7 a_2 + a_7 a_1 a_3$ is divisible by $3.$
|
tasks/smallmath-0030/solution/solve.sh
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
set -eu
|
| 3 |
+
answer=${ANSWER:-/app/answer.txt}
|
| 4 |
+
mkdir -p "$(dirname "$answer")"
|
| 5 |
+
printf "%s\n" 393 > "$answer"
|
tasks/smallmath-0030/task.toml
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
schema_version = "1.4"
|
| 2 |
+
artifacts = ["/app/answer.txt"]
|
| 3 |
+
|
| 4 |
+
[task]
|
| 5 |
+
name = "smallmath/smallmath-0030"
|
| 6 |
+
version = "0.1.0"
|
| 7 |
+
description = "SmallMath competition problem with an integer answer."
|
| 8 |
+
keywords = ["math", "competition", "integer"]
|
| 9 |
+
|
| 10 |
+
[metadata]
|
| 11 |
+
category = "math"
|
| 12 |
+
source = "MathArena/smallmath@13ef9727659718de8bcba221cfe8f8a65bf88a99"
|
| 13 |
+
problem_id = "30"
|
| 14 |
+
level = 6
|
| 15 |
+
answer_kind = "integer"
|
| 16 |
+
grader_sha256 = "14122999da68091988faedea6b9ba0bc2b25fad38a3ca54158eb52b1cb2ee7ba"
|
| 17 |
+
|
| 18 |
+
[agent]
|
| 19 |
+
network_mode = "allowlist"
|
| 20 |
+
timeout_sec = 3600
|
| 21 |
+
|
| 22 |
+
[environment]
|
| 23 |
+
docker_image = "docker.io/library/python:3.12-slim"
|
| 24 |
+
cpus = 1
|
| 25 |
+
memory_mb = 2048
|
| 26 |
+
|
| 27 |
+
[verifier]
|
| 28 |
+
network_mode = "allowlist"
|
| 29 |
+
timeout_sec = 180
|
tasks/smallmath-0030/tests/grade_task.py
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Grade the answer file against tests/reference.json. Writes reward.txt (1/0), grade.json and a copy of the
|
| 2 |
+
answer (answer.txt) to VERIFIER_DIR. Any error -> reward 0. The sympy/mpmath wheels ship base64-encoded (plain git
|
| 3 |
+
text: the Hub stores binary files in LFS/Xet, which a plain `git checkout` without git-lfs cannot read)."""
|
| 4 |
+
import base64
|
| 5 |
+
import hashlib
|
| 6 |
+
import io
|
| 7 |
+
import json
|
| 8 |
+
import os
|
| 9 |
+
import stat
|
| 10 |
+
import sys
|
| 11 |
+
import tempfile
|
| 12 |
+
import zipfile
|
| 13 |
+
|
| 14 |
+
LIMIT = 10_000 # bytes
|
| 15 |
+
WHEELS = {"sympy-1.14.0-py3-none-any.whl": "e091cc3e99d2141a0ba2847328f5479b05d94a6635cb96148ccb3f34671bd8f5", "mpmath-1.3.0-py3-none-any.whl": "a0b2b9fe80bbcd81a6647ff13108738cfb482d481d826cc0e02f5b35e5c88d2c"}
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
def read_own(path):
|
| 19 |
+
"""Bytes of the regular file at exactly `path`: every folder on the way and the file are opened without
|
| 20 |
+
following links (a FIFO cannot block it); one link only; at most LIMIT bytes."""
|
| 21 |
+
parts = os.path.abspath(path).split("/")[1:]
|
| 22 |
+
folder = os.open("/", os.O_RDONLY | os.O_DIRECTORY)
|
| 23 |
+
try:
|
| 24 |
+
for part in parts[:-1]:
|
| 25 |
+
inner = os.open(part, os.O_RDONLY | os.O_DIRECTORY | os.O_NOFOLLOW, dir_fd=folder)
|
| 26 |
+
os.close(folder)
|
| 27 |
+
folder = inner
|
| 28 |
+
fd = os.open(parts[-1], os.O_RDONLY | os.O_NOFOLLOW | os.O_NONBLOCK, dir_fd=folder)
|
| 29 |
+
finally:
|
| 30 |
+
os.close(folder)
|
| 31 |
+
with os.fdopen(fd, "rb") as stream:
|
| 32 |
+
info = os.fstat(stream.fileno())
|
| 33 |
+
if not stat.S_ISREG(info.st_mode) or info.st_nlink != 1:
|
| 34 |
+
raise ValueError("answer is not a regular file of its own")
|
| 35 |
+
data = stream.read(LIMIT + 1)
|
| 36 |
+
if len(data) > LIMIT:
|
| 37 |
+
raise ValueError(f"answer file larger than {LIMIT} bytes")
|
| 38 |
+
return data
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
def write_new(path, text):
|
| 42 |
+
try:
|
| 43 |
+
os.unlink(path)
|
| 44 |
+
except FileNotFoundError:
|
| 45 |
+
pass
|
| 46 |
+
fd = os.open(path, os.O_WRONLY | os.O_CREAT | os.O_TRUNC | os.O_NOFOLLOW, 0o644)
|
| 47 |
+
with os.fdopen(fd, "w") as stream:
|
| 48 |
+
stream.write(text)
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
def load_grader(tests):
|
| 52 |
+
lib = tempfile.mkdtemp(prefix="grader-lib-")
|
| 53 |
+
for name, digest in WHEELS.items():
|
| 54 |
+
blob = base64.b64decode(open(os.path.join(tests, name + ".b64"), "rb").read())
|
| 55 |
+
if hashlib.sha256(blob).hexdigest() != digest:
|
| 56 |
+
raise ValueError(f"wheel hash mismatch: {name}")
|
| 57 |
+
with zipfile.ZipFile(io.BytesIO(blob)) as z:
|
| 58 |
+
z.extractall(lib)
|
| 59 |
+
sys.path[:0] = [lib, tests]
|
| 60 |
+
import grader
|
| 61 |
+
return grader
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
def main():
|
| 65 |
+
tests, out = os.environ["TESTS_DIR"], os.environ["VERIFIER_DIR"]
|
| 66 |
+
os.makedirs(out, exist_ok=True)
|
| 67 |
+
write_new(os.path.join(out, "reward.txt"), "0")
|
| 68 |
+
passed, why, submission = False, "grader error", ""
|
| 69 |
+
try:
|
| 70 |
+
try:
|
| 71 |
+
submission = read_own(os.environ["ANSWER"]).decode("utf-8", "replace")
|
| 72 |
+
except FileNotFoundError:
|
| 73 |
+
submission, why = None, "no answer file"
|
| 74 |
+
except (OSError, ValueError) as e:
|
| 75 |
+
submission, why = None, f"answer file rejected: {e}"
|
| 76 |
+
if submission is not None:
|
| 77 |
+
write_new(os.path.join(out, "answer.txt"), submission)
|
| 78 |
+
reference = json.loads(open(os.path.join(tests, "reference.json")).read())["answer"]
|
| 79 |
+
grader = load_grader(tests)
|
| 80 |
+
passed, why = grader.grade_safe(reference, submission, timeout=60) if submission.strip() else (False, "empty")
|
| 81 |
+
except Exception as e:
|
| 82 |
+
passed, why = False, f"grader error: {type(e).__name__}: {str(e)[:200]}"
|
| 83 |
+
if passed:
|
| 84 |
+
write_new(os.path.join(out, "reward.txt"), "1")
|
| 85 |
+
write_new(os.path.join(out, "grade.json"), json.dumps({"passed": passed, "why": why, "submission": (submission or "")[:500]}))
|
| 86 |
+
print("reward:", 1 if passed else 0, "|", why)
|
| 87 |
+
|
| 88 |
+
|
| 89 |
+
if __name__ == "__main__":
|
| 90 |
+
main()
|
tasks/smallmath-0030/tests/grader.py
ADDED
|
@@ -0,0 +1,501 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Strict, exact single-number grader for Harbor math tasks (v2).
|
| 2 |
+
|
| 3 |
+
Contract (one uniform instruction for every task): the final answer is ONE exact number, e.g. 42, -7, 3/8,
|
| 4 |
+
\\frac{3}{8}, 2\\sqrt{3}, \\frac{\\pi}{4}. No units, words, variables, "x =", sets, ranges, percent, or approximations.
|
| 5 |
+
|
| 6 |
+
grade(reference, submission) -> (passed: bool, reason: str)
|
| 7 |
+
grade_safe(reference, submission, timeout=10) -> same, run in a memory-capped subprocess (use this in verifiers)
|
| 8 |
+
|
| 9 |
+
How it works
|
| 10 |
+
- Extract: the last top-level \\boxed{...} / \\fbox{...} (brace-matched; a box nested inside the chosen box is
|
| 11 |
+
rejected), else the whole text. Normalize unicode (NFKC, every dash/minus, superscript digits, zero-width chars,
|
| 12 |
+
BOM), strip markdown bold, "Answer:", $..$, \\(..\\), \\[..\\], a trailing period (repeatedly, so "$5$." works),
|
| 13 |
+
\\left. \\right. (null delimiters), \\left/\\right, LaTeX spacing; plain-text forms sqrt(..), pi, ** become LaTeX.
|
| 14 |
+
Digit grouping (1,024 / 1\\,024 / 1 024 / 1{,}024) is removed only when the whole number is grouped in threes.
|
| 15 |
+
0.\\overline{3} becomes 1/3 exactly.
|
| 16 |
+
- Parse with a small recursive-descent parser over a restricted grammar: numbers, + - * / ^, \\frac (also with TeX
|
| 17 |
+
single-token arguments, \\frac12 = 1/2), \\sqrt{x}, \\sqrt[n]{x} (odd roots of negatives are real: \\sqrt[3]{-8} = -2),
|
| 18 |
+
\\pi, \\cdot, \\times, brackets, implicit multiplication. Functions (\\ln/\\log, \\exp/e, \\sin/\\cos/\\tan,
|
| 19 |
+
\\arcsin/\\arccos/\\arctan) are allowed only if the REFERENCE uses their family, so the problem cannot be restated
|
| 20 |
+
instead of solved (\\lfloor, \\binom, factorials, sums: never). Scientific notation (1e5) is off when the reference
|
| 21 |
+
uses the constant e (so "4e+1" means 4e+1). "3\\frac{1}{6}" is a mixed number in a reference and is rejected as
|
| 22 |
+
ambiguous in a submission. "\\sqrt 16" (TeX: sqrt(1)*6) is rejected. 0^0, division by zero, non-real and huge
|
| 23 |
+
values are rejected; written decimals are exact rationals (0.25 = 1/4; 1.41421356 is NOT sqrt 2).
|
| 24 |
+
- Compare EXACTLY, never with a numeric tolerance (a numeric check can only reject, for speed):
|
| 25 |
+
rationals by equality; algebraic numbers by minimal_polynomial(s - g) == x; expressions with pi as polynomials in
|
| 26 |
+
a symbol T with algebraic coefficients (pi is transcendental); anything with ln/e/trig only if sympy simplifies the
|
| 27 |
+
difference to exactly 0. Anything that cannot be proved equal within the time limit fails.
|
| 28 |
+
"""
|
| 29 |
+
import multiprocessing as mp
|
| 30 |
+
import re
|
| 31 |
+
import unicodedata
|
| 32 |
+
|
| 33 |
+
import sympy
|
| 34 |
+
from sympy import Integer, Rational
|
| 35 |
+
|
| 36 |
+
__version__ = "2"
|
| 37 |
+
MAX_LEN = 1000 # characters of the cleaned answer
|
| 38 |
+
MAX_INT_DIGITS = 1000 # digits of any number literal
|
| 39 |
+
MAX_EXPONENT = 3000 # |exponent| allowed in a power or in scientific notation
|
| 40 |
+
MAX_POW_BITS = 100_000 # estimated size of an exact power before computing it
|
| 41 |
+
MEM_LIMIT = 2 << 30 # extra address space allowed to the grade_safe worker (bytes)
|
| 42 |
+
FUNCS = {"ln": sympy.log, "log": sympy.log, "sin": sympy.sin, "cos": sympy.cos, "tan": sympy.tan,
|
| 43 |
+
"arcsin": sympy.asin, "arccos": sympy.acos, "arctan": sympy.atan, "exp": sympy.exp}
|
| 44 |
+
FAMILIES = [{"ln", "log"}, {"exp", "e"}, {"sin", "cos", "tan"}, {"arcsin", "arccos", "arctan"}]
|
| 45 |
+
TRANSCENDENTAL = (sympy.exp, sympy.log, sympy.sin, sympy.cos, sympy.tan, sympy.asin, sympy.acos, sympy.atan)
|
| 46 |
+
_X, _T = sympy.Symbol("x"), sympy.Symbol("T")
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
class Reject(Exception):
|
| 50 |
+
pass
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
# ---------------------------------------------------------------- extraction and cleaning
|
| 54 |
+
_BOX = re.compile(r"\\(?:boxed|fbox)\s*\{")
|
| 55 |
+
_SUPERSCRIPT = str.maketrans("\u2070\u00b9\u00b2\u00b3\u2074\u2075\u2076\u2077\u2078\u2079\u207b", "0123456789-")
|
| 56 |
+
_DASHES = "\u2010\u2011\u2012\u2013\u2014\u2212\ufe63\uff0d"
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
def _last_top_level_box(text: str):
|
| 60 |
+
"""Content of the last \\boxed{..}/\\fbox{..} that is not inside another box; None if there is no box.
|
| 61 |
+
Rejects an unbalanced last box and a box nested inside the chosen box."""
|
| 62 |
+
spans, i = [], 0
|
| 63 |
+
while True:
|
| 64 |
+
m = _BOX.search(text, i)
|
| 65 |
+
if not m:
|
| 66 |
+
break
|
| 67 |
+
depth, j = 1, m.end()
|
| 68 |
+
while j < len(text) and depth:
|
| 69 |
+
depth += {"{": 1, "}": -1}.get(text[j], 0)
|
| 70 |
+
j += 1
|
| 71 |
+
if depth:
|
| 72 |
+
raise Reject("unbalanced \\boxed")
|
| 73 |
+
spans.append((m.end(), j - 1))
|
| 74 |
+
i = j # continue AFTER this box: inner boxes are not top level
|
| 75 |
+
if not spans:
|
| 76 |
+
return None
|
| 77 |
+
a, b = spans[-1]
|
| 78 |
+
inner = text[a:b]
|
| 79 |
+
if _BOX.search(inner):
|
| 80 |
+
raise Reject("box inside box")
|
| 81 |
+
return inner
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
def _normalize_unicode(t: str) -> str:
|
| 85 |
+
t = re.sub("[\ufeff\u200b\u200c\u200d\u2060\u00ad]", "", t)
|
| 86 |
+
t = re.sub("[\u2070\u00b9\u00b2\u00b3\u2074-\u2079\u207b]+", lambda m: "^{" + m.group().translate(_SUPERSCRIPT) + "}", t)
|
| 87 |
+
for ch in _DASHES:
|
| 88 |
+
t = t.replace(ch, "-")
|
| 89 |
+
t = t.replace("\u00d7", "\\times ").replace("\u00b7", "\\cdot ").replace("\u22c5", "\\cdot ")
|
| 90 |
+
t = t.replace("\u03c0", "\\pi ").replace("\u221a", "\\sqrt")
|
| 91 |
+
return unicodedata.normalize("NFKC", t)
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
def _repeating(m) -> str:
|
| 95 |
+
whole, fixed, rep = m.group(1) or "0", m.group(2), m.group(3)
|
| 96 |
+
num = Integer(int(fixed + rep)) - Integer(int(fixed or "0"))
|
| 97 |
+
den = Integer(10) ** len(fixed) * (Integer(10) ** len(rep) - 1)
|
| 98 |
+
v = Integer(int(whole)) + num / den
|
| 99 |
+
return f"(\\frac{{{v.p}}}{{{v.q}}})"
|
| 100 |
+
|
| 101 |
+
|
| 102 |
+
_NOT_UNIT = re.compile(r"\b(?:or|and|to|for|if|is|not|no|none|either|approx|about|between|each|where|with)\b", re.I)
|
| 103 |
+
_UNIT_TEXT = re.compile(r"\s*\\(?:text|mathrm|mbox|textrm|operatorname)\s*\{\s*([A-Za-z][A-Za-z ./^0-9-]{0,24})\}\s*$")
|
| 104 |
+
_UNIT_WORD = re.compile(r"(?<=[\d})])\s+([A-Za-z]{2,12}(?:\s?/\s?[A-Za-z]{1,8})?(?:\^\{?\d\}?)?)\s*$")
|
| 105 |
+
_DEGREES = re.compile(r"\s*(?:\^\s*\{?\s*\\circ\s*\}?|°|\\degree)\s*$")
|
| 106 |
+
_LHS = re.compile(r"^\s*[A-Za-z](?:_\{?[A-Za-z0-9]+\}?)?\s*=\s*(?=[^=]+$)")
|
| 107 |
+
|
| 108 |
+
|
| 109 |
+
def strip_wrappers(t: str) -> str:
|
| 110 |
+
"""Remove a wrapper around ONE value: trailing units (30 ft/s, 111 meters, \\sqrt{109}\\text{ m}), a degree sign,
|
| 111 |
+
or a single 'n =' prefix. Hedges ('32 \\text{ or } 33'), approximations and multi-part answers are untouched."""
|
| 112 |
+
prev = None
|
| 113 |
+
while t != prev:
|
| 114 |
+
prev = t
|
| 115 |
+
m = _UNIT_TEXT.search(t)
|
| 116 |
+
if m and not _NOT_UNIT.search(m.group(1)) and t[:m.start()].strip():
|
| 117 |
+
t = t[:m.start()].rstrip()
|
| 118 |
+
m = _UNIT_WORD.search(t)
|
| 119 |
+
if m and not _NOT_UNIT.search(m.group(1)):
|
| 120 |
+
t = t[:m.start()].rstrip()
|
| 121 |
+
if t[:-1].strip():
|
| 122 |
+
t = _DEGREES.sub("", t).rstrip()
|
| 123 |
+
t = _LHS.sub("", t)
|
| 124 |
+
return t
|
| 125 |
+
|
| 126 |
+
|
| 127 |
+
def clean(text: str) -> str:
|
| 128 |
+
t = _normalize_unicode((text or "").strip())
|
| 129 |
+
boxed = _last_top_level_box(t)
|
| 130 |
+
if boxed is not None:
|
| 131 |
+
t = boxed
|
| 132 |
+
prev = None
|
| 133 |
+
while t != prev: # peel wrappers in any order: "**Answer:** $5$." -> 5
|
| 134 |
+
prev = t
|
| 135 |
+
t = t.strip()
|
| 136 |
+
t = re.sub(r"^(\*\*|__)(.*)\1$", r"\2", t, flags=re.S).strip()
|
| 137 |
+
t = re.sub(r"^\**\s*(?:the\s+)?(?:final\s+)?answer\s*(?:is)?\s*[:=]?\s*\**\s*", "", t, flags=re.I).strip()
|
| 138 |
+
for a, b in (("$$", "$$"), ("$", "$"), ("\\(", "\\)"), ("\\[", "\\]")):
|
| 139 |
+
if t.startswith(a) and t.endswith(b) and len(t) > len(a) + len(b):
|
| 140 |
+
t = t[len(a):-len(b)].strip()
|
| 141 |
+
t = t.rstrip(". ").strip()
|
| 142 |
+
t = re.sub(r"\\(?:left|right)\.", "", t) # null delimiters
|
| 143 |
+
t = re.sub(r"\\(?:displaystyle|left|right|bigl|bigr|Bigl|Bigr|big|Big)(?![A-Za-z])", "", t)
|
| 144 |
+
t = re.sub(r"\\mathrm\{e\}|\\mathit\{e\}", "e", t)
|
| 145 |
+
t = re.sub(r"\\[dtc]frac(?![A-Za-z])", r"\\frac", t)
|
| 146 |
+
t = re.sub(r"(\d*)\.(\d*)\\overline\{(\d+)\}", _repeating, t)
|
| 147 |
+
t = re.sub(r"(?<=\d)\\[,;! ](?=\d{3}(?!\d))", "", t) # 2\,560\,320 -> 2560320
|
| 148 |
+
t = re.sub(r"\\[,;:! ]|~", " ", t)
|
| 149 |
+
t = strip_wrappers(t) # 30 ft/s, n = 24^5, 30° -> the bare value
|
| 150 |
+
t = re.sub(r"(?<=\d)\s*\{,\}\s*(?=\d{3}(?!\d))", "", t) # 3{,}100
|
| 151 |
+
if re.fullmatch(r"\s*-?\d{1,3}([, ]\d{3})+(\.\d+)?\s*", t) and len(set(re.findall(r"[, ]", t.strip()))) == 1:
|
| 152 |
+
t = re.sub(r"[, ]", "", t) # 3,100 / 1,000.5 / 1 000 (one separator kind)
|
| 153 |
+
t = t.replace("**", "^") # python power
|
| 154 |
+
t = re.sub(r"(?<![\\A-Za-z])sqrt\s*(?=[({])", r"\\sqrt", t) # sqrt(2) -> \sqrt(2)
|
| 155 |
+
t = re.sub(r"(?<![\\A-Za-z])pi(?![A-Za-z])", r"\\pi ", t) # pi/4 -> \pi/4
|
| 156 |
+
return re.sub(r"\s+", " ", t).strip()
|
| 157 |
+
|
| 158 |
+
|
| 159 |
+
# ---------------------------------------------------------------- parser
|
| 160 |
+
TOKEN = re.compile(r"\s*(?:(?P<num>\d+\.\d*|\.\d+|\d+)(?:[eE](?P<exp>[+-]?\d+))?|(?P<cmd>\\[A-Za-z]+)|(?P<sym>[-+*/^(){}\[\]])|(?P<let>[A-Za-z]))")
|
| 161 |
+
NUM_ONLY = re.compile(r"\s*(?P<num>\d+\.\d*|\.\d+|\d+)")
|
| 162 |
+
|
| 163 |
+
|
| 164 |
+
def tokenize(s: str, sci: bool = True):
|
| 165 |
+
"""Tokens are (kind, value, raw). sci=False turns scientific notation off (the reference uses the constant e)."""
|
| 166 |
+
out, pos = [], 0
|
| 167 |
+
while pos < len(s):
|
| 168 |
+
m = TOKEN.match(s, pos)
|
| 169 |
+
if m and not sci and m.group("num") is not None and m.group("exp") is not None:
|
| 170 |
+
m = NUM_ONLY.match(s, pos) # "4e+1" -> 4, e, +, 1
|
| 171 |
+
if not m or m.end() == pos:
|
| 172 |
+
if s[pos:].strip() == "":
|
| 173 |
+
break
|
| 174 |
+
raise Reject(f"unexpected character {s[pos]!r}")
|
| 175 |
+
pos = m.end()
|
| 176 |
+
if m.group("num") is not None:
|
| 177 |
+
num = m.group("num")
|
| 178 |
+
if len(num.replace(".", "")) > MAX_INT_DIGITS:
|
| 179 |
+
raise Reject("number too long")
|
| 180 |
+
val = Rational(num) if "." in num else Integer(int(num))
|
| 181 |
+
exp = m.groupdict().get("exp")
|
| 182 |
+
if exp is not None:
|
| 183 |
+
if abs(int(exp)) > MAX_EXPONENT:
|
| 184 |
+
raise Reject("exponent too large")
|
| 185 |
+
val = val * Rational(10) ** int(exp)
|
| 186 |
+
out.append(("num", val, m.group(0).strip()))
|
| 187 |
+
elif m.group("cmd"):
|
| 188 |
+
out.append(("cmd", m.group("cmd")[1:], m.group("cmd")))
|
| 189 |
+
elif m.group("sym"):
|
| 190 |
+
out.append(("sym", m.group("sym"), m.group("sym")))
|
| 191 |
+
else:
|
| 192 |
+
out.append(("let", m.group("let"), m.group("let")))
|
| 193 |
+
return out
|
| 194 |
+
|
| 195 |
+
|
| 196 |
+
def _mixed_numbers(tokens, is_reference: bool):
|
| 197 |
+
"""N\\frac{a}{b} with integer literals N, a, b: a mixed number (N + a/b) in a reference; ambiguous in a submission."""
|
| 198 |
+
out, i = [], 0
|
| 199 |
+
pat = ["num", ("cmd", "frac"), ("sym", "{"), "num", ("sym", "}"), ("sym", "{"), "num", ("sym", "}")]
|
| 200 |
+
while i < len(tokens):
|
| 201 |
+
win = tokens[i:i + 8]
|
| 202 |
+
ok = len(win) == 8 and all((w[0] == p) if isinstance(p, str) else (w[0], w[1]) == p for w, p in zip(win, pat))
|
| 203 |
+
ok = ok and all(win[k][2].isdigit() for k in (0, 3, 6))
|
| 204 |
+
prev = out[-1] if out else None
|
| 205 |
+
if ok and not (prev and (prev[0] == "cmd" or prev[:2] == ("sym", "^"))):
|
| 206 |
+
if not is_reference:
|
| 207 |
+
raise Reject("ambiguous mixed number (write 7/2, not 3\\frac{1}{2})")
|
| 208 |
+
if win[6][1] == 0:
|
| 209 |
+
raise Reject("division by zero")
|
| 210 |
+
out.append(("num", win[0][1] + win[3][1] / win[6][1], "mixed"))
|
| 211 |
+
i += 8
|
| 212 |
+
continue
|
| 213 |
+
out.append(tokens[i]); i += 1
|
| 214 |
+
return out
|
| 215 |
+
|
| 216 |
+
|
| 217 |
+
def _nonzero(d):
|
| 218 |
+
"""Reject a zero divisor, including a disguised one (sqrt(3+2sqrt2)-1-sqrt2). Numeric check: reject-only."""
|
| 219 |
+
if d == 0 or d.is_zero:
|
| 220 |
+
raise Reject("division by zero")
|
| 221 |
+
if not d.is_Rational:
|
| 222 |
+
try:
|
| 223 |
+
v = sympy.N(d, 60)
|
| 224 |
+
except Exception:
|
| 225 |
+
raise Reject("cannot evaluate divisor")
|
| 226 |
+
if not v.is_Number or abs(v) < sympy.Float("1e-45", 60):
|
| 227 |
+
raise Reject("division by (numerically) zero")
|
| 228 |
+
return d
|
| 229 |
+
|
| 230 |
+
|
| 231 |
+
def _pow_bits(expr) -> int:
|
| 232 |
+
return sum(abs(int(r.p)).bit_length() + int(r.q).bit_length() for r in expr.atoms(sympy.Rational)) or 1
|
| 233 |
+
|
| 234 |
+
|
| 235 |
+
class Parser:
|
| 236 |
+
"""expr := term (('+'|'-') term)* ; term := unary (('*'|'/'|implicit) unary)* ; unary := ('-'|'+') unary | power
|
| 237 |
+
power := atom ('^' exponent)? ; atom := number | group | \\frac A A | \\sqrt[n] A | \\pi | e | func arg"""
|
| 238 |
+
|
| 239 |
+
def __init__(self, tokens, allowed):
|
| 240 |
+
self.t, self.i, self.allowed = list(tokens), 0, allowed
|
| 241 |
+
|
| 242 |
+
def peek(self):
|
| 243 |
+
return self.t[self.i][:2] if self.i < len(self.t) else (None, None)
|
| 244 |
+
|
| 245 |
+
def take(self, kind=None, val=None):
|
| 246 |
+
k, v = self.peek()
|
| 247 |
+
if k is None or (kind and k != kind) or (val is not None and v != val):
|
| 248 |
+
raise Reject(f"malformed near token {self.i}")
|
| 249 |
+
self.i += 1
|
| 250 |
+
return v
|
| 251 |
+
|
| 252 |
+
def parse(self):
|
| 253 |
+
if not self.t:
|
| 254 |
+
raise Reject("empty")
|
| 255 |
+
e = self.expr()
|
| 256 |
+
if self.i != len(self.t):
|
| 257 |
+
raise Reject("trailing input")
|
| 258 |
+
return e
|
| 259 |
+
|
| 260 |
+
def expr(self):
|
| 261 |
+
v = self.term()
|
| 262 |
+
while self.peek() in (("sym", "+"), ("sym", "-")):
|
| 263 |
+
op = self.take()
|
| 264 |
+
r = self.term()
|
| 265 |
+
v = v + r if op == "+" else v - r
|
| 266 |
+
return v
|
| 267 |
+
|
| 268 |
+
def starts_atom(self):
|
| 269 |
+
k, v = self.peek()
|
| 270 |
+
return k == "num" or (k == "sym" and v in "({[") or (k == "cmd" and v in ({"frac", "sqrt", "pi"} | self.allowed)) \
|
| 271 |
+
or (k == "let" and v == "e" and "e" in self.allowed)
|
| 272 |
+
|
| 273 |
+
def term(self):
|
| 274 |
+
v = self.unary()
|
| 275 |
+
while True:
|
| 276 |
+
k, s = self.peek()
|
| 277 |
+
if (k, s) in (("sym", "*"), ("cmd", "cdot"), ("cmd", "times")):
|
| 278 |
+
self.take(); v = v * self.unary()
|
| 279 |
+
elif (k, s) == ("sym", "/"):
|
| 280 |
+
self.take(); v = v / _nonzero(self.unary())
|
| 281 |
+
elif self.starts_atom():
|
| 282 |
+
if self.peek()[0] == "num":
|
| 283 |
+
raise Reject("two numbers side by side") # "2 100" or "\sqrt 16" is malformed, not a product
|
| 284 |
+
v = v * self.power() # implicit multiplication: 2\sqrt{3}, 3\pi, 2(1+x)
|
| 285 |
+
else:
|
| 286 |
+
return v
|
| 287 |
+
|
| 288 |
+
def unary(self):
|
| 289 |
+
if self.peek() == ("sym", "-"):
|
| 290 |
+
self.take(); return -self.unary()
|
| 291 |
+
if self.peek() == ("sym", "+"):
|
| 292 |
+
self.take(); return self.unary()
|
| 293 |
+
return self.power()
|
| 294 |
+
|
| 295 |
+
def power(self):
|
| 296 |
+
base = self.atom()
|
| 297 |
+
if self.peek() != ("sym", "^"):
|
| 298 |
+
return base
|
| 299 |
+
self.take()
|
| 300 |
+
if self.peek() == ("sym", "{"):
|
| 301 |
+
exp = self.group()
|
| 302 |
+
elif self.peek() in (("sym", "-"), ("sym", "+")):
|
| 303 |
+
sign = -1 if self.take() == "-" else 1 # 2^-1
|
| 304 |
+
exp = sign * self.atom()
|
| 305 |
+
else:
|
| 306 |
+
exp = self.atom()
|
| 307 |
+
if self.peek() == ("sym", "^"):
|
| 308 |
+
raise Reject("power tower")
|
| 309 |
+
return self._pow(base, exp)
|
| 310 |
+
|
| 311 |
+
def _pow(self, base, exp):
|
| 312 |
+
if not exp.is_number or exp.is_real is False:
|
| 313 |
+
raise Reject("non-numeric exponent")
|
| 314 |
+
if not exp.is_Rational:
|
| 315 |
+
if base == sympy.E and "e" in self.allowed and abs(sympy.N(exp, 15)) <= MAX_EXPONENT:
|
| 316 |
+
return sympy.exp(exp) # e^{\ln 2}
|
| 317 |
+
raise Reject("irrational exponent not supported")
|
| 318 |
+
if abs(exp) > MAX_EXPONENT:
|
| 319 |
+
raise Reject("exponent too large")
|
| 320 |
+
if base == 0 and exp <= 0:
|
| 321 |
+
raise Reject("0^0 or division by zero")
|
| 322 |
+
if exp < 0:
|
| 323 |
+
_nonzero(base)
|
| 324 |
+
if _pow_bits(base) * max(1, abs(int(exp.p))) > MAX_POW_BITS:
|
| 325 |
+
raise Reject("value too large")
|
| 326 |
+
if base.is_negative and exp.q % 2 == 1 and exp.q > 1:
|
| 327 |
+
return (-1) ** exp.p * (-base) ** exp # real odd root: (-8)^{1/3} = -2
|
| 328 |
+
return base ** exp
|
| 329 |
+
|
| 330 |
+
def group(self):
|
| 331 |
+
open_ = self.take("sym")
|
| 332 |
+
close = {"(": ")", "[": "]", "{": "}"}.get(open_)
|
| 333 |
+
if close is None:
|
| 334 |
+
raise Reject("unexpected symbol")
|
| 335 |
+
v = self.expr()
|
| 336 |
+
self.take("sym", close)
|
| 337 |
+
return v
|
| 338 |
+
|
| 339 |
+
def arg(self):
|
| 340 |
+
"""A TeX macro argument: {..}, (..) / [..] (plain-text style), or ONE token (\\frac12, \\frac\\pi4, \\sqrt2)."""
|
| 341 |
+
k, v = self.peek()
|
| 342 |
+
if k == "sym" and v in "{([":
|
| 343 |
+
return self.group()
|
| 344 |
+
if k == "num":
|
| 345 |
+
raw = self.t[self.i][2]
|
| 346 |
+
if not raw.isdigit():
|
| 347 |
+
raise Reject("ambiguous unbraced argument")
|
| 348 |
+
if len(raw) == 1:
|
| 349 |
+
self.i += 1
|
| 350 |
+
return v
|
| 351 |
+
self.t[self.i] = ("num", Integer(int(raw[1:])), raw[1:]) # TeX takes one digit: \frac12 = 1/2
|
| 352 |
+
return Integer(int(raw[0]))
|
| 353 |
+
if (k == "cmd" and v == "pi") or (k == "let" and v == "e" and "e" in self.allowed):
|
| 354 |
+
return self.atom()
|
| 355 |
+
raise Reject("ambiguous unbraced argument")
|
| 356 |
+
|
| 357 |
+
def atom(self):
|
| 358 |
+
k, v = self.peek()
|
| 359 |
+
if k == "num":
|
| 360 |
+
self.take(); return v
|
| 361 |
+
if k == "sym" and v in "({[":
|
| 362 |
+
return self.group()
|
| 363 |
+
if k == "let" and v == "e" and "e" in self.allowed:
|
| 364 |
+
self.take(); return sympy.E
|
| 365 |
+
if k == "cmd":
|
| 366 |
+
self.take()
|
| 367 |
+
if v == "frac":
|
| 368 |
+
n, d = self.arg(), self.arg()
|
| 369 |
+
return n / _nonzero(d)
|
| 370 |
+
if v == "sqrt":
|
| 371 |
+
if self.peek() == ("sym", "["):
|
| 372 |
+
self.take(); idx = self.expr(); self.take("sym", "]")
|
| 373 |
+
if not (idx.is_Integer and 2 <= idx <= 50):
|
| 374 |
+
raise Reject("bad root index")
|
| 375 |
+
return self._pow(self.arg(), Rational(1, int(idx)))
|
| 376 |
+
return self._pow(self.arg(), Rational(1, 2))
|
| 377 |
+
if v == "pi":
|
| 378 |
+
return sympy.pi
|
| 379 |
+
if v in FUNCS and v in self.allowed:
|
| 380 |
+
if self.peek() in (("sym", "{"), ("sym", "("), ("sym", "[")):
|
| 381 |
+
a = self.group()
|
| 382 |
+
else:
|
| 383 |
+
a = self.power()
|
| 384 |
+
return FUNCS[v](a)
|
| 385 |
+
raise Reject(f"\\{v} not allowed")
|
| 386 |
+
if k == "let":
|
| 387 |
+
raise Reject(f"variable or word {v!r}")
|
| 388 |
+
raise Reject("malformed")
|
| 389 |
+
|
| 390 |
+
|
| 391 |
+
def allowed_from_reference(ref_clean: str) -> set:
|
| 392 |
+
allowed = {c for c in FUNCS if re.search(r"\\" + c + r"(?![A-Za-z])", ref_clean)}
|
| 393 |
+
if re.search(r"(?<![A-Za-z\\])e(?![A-Za-z])", re.sub(r"\\[A-Za-z]+", "", ref_clean)):
|
| 394 |
+
allowed.add("e")
|
| 395 |
+
for fam in FAMILIES:
|
| 396 |
+
if allowed & fam:
|
| 397 |
+
allowed |= fam
|
| 398 |
+
return allowed
|
| 399 |
+
|
| 400 |
+
|
| 401 |
+
def value(text: str, allowed: set, is_reference: bool = False):
|
| 402 |
+
t = clean(text)
|
| 403 |
+
if not t:
|
| 404 |
+
raise Reject("empty")
|
| 405 |
+
if len(t) > MAX_LEN:
|
| 406 |
+
raise Reject("answer too long")
|
| 407 |
+
if re.search(r"\\(?:text|mathrm|mathbf|operatorname|boxed|fbox)\{|\\%|%|\\approx|\\pm|\\mp|=|<|>|\\le|\\ge|\\ne|\\in(?![A-Za-z])|\\infty|\\circ|°|,", t):
|
| 408 |
+
raise Reject("not a single exact number (units/text/relation/percent/approximation/list)")
|
| 409 |
+
tokens = _mixed_numbers(tokenize(t, sci="e" not in allowed), is_reference)
|
| 410 |
+
v = Parser(tokens, allowed).parse()
|
| 411 |
+
if v.has(sympy.zoo, sympy.oo, -sympy.oo, sympy.nan) or v.is_finite is False:
|
| 412 |
+
raise Reject("non-finite value")
|
| 413 |
+
if v.is_real is False:
|
| 414 |
+
raise Reject("not a real number")
|
| 415 |
+
return v
|
| 416 |
+
|
| 417 |
+
|
| 418 |
+
def _is_transcendental(expr) -> bool:
|
| 419 |
+
return expr.has(sympy.E) or any(expr.has(f) for f in TRANSCENDENTAL)
|
| 420 |
+
|
| 421 |
+
|
| 422 |
+
def exact_equal(s, g) -> bool:
|
| 423 |
+
"""True only if s == g is PROVED. Numeric evaluation is used to reject quickly, never to accept."""
|
| 424 |
+
if s.is_Rational and g.is_Rational:
|
| 425 |
+
return s == g
|
| 426 |
+
d = s - g
|
| 427 |
+
if d == 0:
|
| 428 |
+
return True
|
| 429 |
+
try:
|
| 430 |
+
dv, gv = sympy.N(d, 50), sympy.N(g, 50)
|
| 431 |
+
if dv.is_Number and gv.is_Number and abs(dv) > sympy.Float("1e-30", 50) * max(1, abs(gv)):
|
| 432 |
+
return False
|
| 433 |
+
except Exception:
|
| 434 |
+
pass
|
| 435 |
+
if _is_transcendental(d): # ln / e / trig: only an exact simplification to 0 counts
|
| 436 |
+
for cand in (sympy.expand_log(d), d):
|
| 437 |
+
try:
|
| 438 |
+
if sympy.simplify(cand) == 0:
|
| 439 |
+
return True
|
| 440 |
+
except Exception:
|
| 441 |
+
pass
|
| 442 |
+
return False
|
| 443 |
+
if d.has(sympy.pi): # pi is transcendental: d == 0 iff every coefficient in T is 0
|
| 444 |
+
num = sympy.together(sympy.expand(d.subs(sympy.pi, _T))).as_numer_denom()[0]
|
| 445 |
+
poly = sympy.Poly(sympy.expand(num), _T)
|
| 446 |
+
return all(sympy.minimal_polynomial(c, _X) == _X for c in poly.coeffs())
|
| 447 |
+
return sympy.minimal_polynomial(d, _X) == _X
|
| 448 |
+
|
| 449 |
+
|
| 450 |
+
def grade(reference: str, submission: str):
|
| 451 |
+
try:
|
| 452 |
+
ref_clean = clean(reference)
|
| 453 |
+
allowed = allowed_from_reference(ref_clean)
|
| 454 |
+
g = value(reference, allowed, is_reference=True)
|
| 455 |
+
except Reject as e:
|
| 456 |
+
return False, f"reference unusable: {e}"
|
| 457 |
+
except Exception as e:
|
| 458 |
+
return False, f"reference unusable: {type(e).__name__}"
|
| 459 |
+
try:
|
| 460 |
+
s = value(submission, allowed)
|
| 461 |
+
except Reject as e:
|
| 462 |
+
return False, f"format: {e}"
|
| 463 |
+
except (RecursionError, ValueError, TypeError, ZeroDivisionError, OverflowError) as e:
|
| 464 |
+
return False, f"format: {type(e).__name__}"
|
| 465 |
+
try:
|
| 466 |
+
ok = exact_equal(s, g)
|
| 467 |
+
except Exception as e:
|
| 468 |
+
return False, f"could not prove equal ({type(e).__name__})"
|
| 469 |
+
return (True, "exact match") if ok else (False, "wrong value")
|
| 470 |
+
|
| 471 |
+
|
| 472 |
+
def _worker(q, reference, submission):
|
| 473 |
+
try:
|
| 474 |
+
import resource # cap = current address space + MEM_LIMIT (an absolute cap breaks
|
| 475 |
+
vm = 0 # workers forked from big parents: they hang instead of grading)
|
| 476 |
+
for line in open("/proc/self/status"):
|
| 477 |
+
if line.startswith("VmSize:"):
|
| 478 |
+
vm = int(line.split()[1]) * 1024
|
| 479 |
+
resource.setrlimit(resource.RLIMIT_AS, (vm + MEM_LIMIT, vm + MEM_LIMIT))
|
| 480 |
+
except Exception:
|
| 481 |
+
pass
|
| 482 |
+
try:
|
| 483 |
+
q.put(grade(reference, submission))
|
| 484 |
+
except MemoryError:
|
| 485 |
+
q.put((False, "grader out of memory"))
|
| 486 |
+
except Exception as e:
|
| 487 |
+
q.put((False, f"grader error: {type(e).__name__}"))
|
| 488 |
+
|
| 489 |
+
|
| 490 |
+
def grade_safe(reference: str, submission: str, timeout: float = 10.0):
|
| 491 |
+
ctx = mp.get_context("fork")
|
| 492 |
+
q = ctx.Queue()
|
| 493 |
+
p = ctx.Process(target=_worker, args=(q, reference, submission))
|
| 494 |
+
p.start(); p.join(timeout)
|
| 495 |
+
if p.is_alive():
|
| 496 |
+
p.kill(); p.join()
|
| 497 |
+
return False, "timeout"
|
| 498 |
+
try:
|
| 499 |
+
return q.get(timeout=1)
|
| 500 |
+
except Exception:
|
| 501 |
+
return False, "grader crashed"
|
tasks/smallmath-0030/tests/mpmath-1.3.0-py3-none-any.whl.b64
ADDED
|
Binary file (715 kB). View file
|
|
|
tasks/smallmath-0030/tests/reference.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"answer": "393"}
|
tasks/smallmath-0030/tests/sympy-1.14.0-py3-none-any.whl.b64
ADDED
|
Binary file (8.4 MB). View file
|
|
|
tasks/smallmath-0030/tests/test.sh
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
# Reward 1 if /app/answer.txt holds one exact number equal to the hidden reference (grader.py, exact sympy proof).
|
| 3 |
+
# 0 is written before anything runs, so a crash, a timeout or a missing/linked/oversized answer scores 0.
|
| 4 |
+
# Python runs isolated (-I -S); sympy/mpmath come from the pinned wheels in this directory (hash-checked, unpacked
|
| 5 |
+
# offline into a new directory): nothing is installed and no network is used. ANSWER and VERIFIER_DIR override
|
| 6 |
+
# the paths, to test the grader locally.
|
| 7 |
+
case $0 in */*) here=${0%/*} ;; *) here=. ;; esac
|
| 8 |
+
export ANSWER=${ANSWER:-/app/answer.txt}
|
| 9 |
+
export VERIFIER_DIR=${VERIFIER_DIR:-/logs/verifier}
|
| 10 |
+
export TESTS_DIR=$here
|
| 11 |
+
[ -d "$VERIFIER_DIR" ] && echo 0 > "$VERIFIER_DIR/reward.txt"
|
| 12 |
+
timeout 150 python3 -B -I -S "$here/grade_task.py" || true
|
tasks/smallmath-0032/instruction.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Solve the following math problem.
|
| 2 |
+
|
| 3 |
+
Solve with your own reasoning and available tools. Do not look anything up online or call other models or services.
|
| 4 |
+
|
| 5 |
+
Write ONLY your final answer to `/app/answer.txt` (create `/app` if needed). The answer must be one exact number, such as an integer, fraction, or exact expression. Do not include units, words, variables, or a decimal approximation.
|
| 6 |
+
|
| 7 |
+
Problem:
|
| 8 |
+
|
| 9 |
+
Find the second smallest positive integer \( n \) satisfying both of the following requirements:
|
| 10 |
+
|
| 11 |
+
- \( n \) is a multiple of 101, and - in the decimal representation of \( n \), the digits 2026 occur consecutively.
|
tasks/smallmath-0032/solution/solve.sh
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
set -eu
|
| 3 |
+
answer=${ANSWER:-/app/answer.txt}
|
| 4 |
+
mkdir -p "$(dirname "$answer")"
|
| 5 |
+
printf "%s\n" 420261 > "$answer"
|
tasks/smallmath-0032/task.toml
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
schema_version = "1.4"
|
| 2 |
+
artifacts = ["/app/answer.txt"]
|
| 3 |
+
|
| 4 |
+
[task]
|
| 5 |
+
name = "smallmath/smallmath-0032"
|
| 6 |
+
version = "0.1.0"
|
| 7 |
+
description = "SmallMath competition problem with an integer answer."
|
| 8 |
+
keywords = ["math", "competition", "integer"]
|
| 9 |
+
|
| 10 |
+
[metadata]
|
| 11 |
+
category = "math"
|
| 12 |
+
source = "MathArena/smallmath@13ef9727659718de8bcba221cfe8f8a65bf88a99"
|
| 13 |
+
problem_id = "32"
|
| 14 |
+
level = 4
|
| 15 |
+
answer_kind = "integer"
|
| 16 |
+
grader_sha256 = "14122999da68091988faedea6b9ba0bc2b25fad38a3ca54158eb52b1cb2ee7ba"
|
| 17 |
+
|
| 18 |
+
[agent]
|
| 19 |
+
network_mode = "allowlist"
|
| 20 |
+
timeout_sec = 3600
|
| 21 |
+
|
| 22 |
+
[environment]
|
| 23 |
+
docker_image = "docker.io/library/python:3.12-slim"
|
| 24 |
+
cpus = 1
|
| 25 |
+
memory_mb = 2048
|
| 26 |
+
|
| 27 |
+
[verifier]
|
| 28 |
+
network_mode = "allowlist"
|
| 29 |
+
timeout_sec = 180
|
tasks/smallmath-0032/tests/grade_task.py
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Grade the answer file against tests/reference.json. Writes reward.txt (1/0), grade.json and a copy of the
|
| 2 |
+
answer (answer.txt) to VERIFIER_DIR. Any error -> reward 0. The sympy/mpmath wheels ship base64-encoded (plain git
|
| 3 |
+
text: the Hub stores binary files in LFS/Xet, which a plain `git checkout` without git-lfs cannot read)."""
|
| 4 |
+
import base64
|
| 5 |
+
import hashlib
|
| 6 |
+
import io
|
| 7 |
+
import json
|
| 8 |
+
import os
|
| 9 |
+
import stat
|
| 10 |
+
import sys
|
| 11 |
+
import tempfile
|
| 12 |
+
import zipfile
|
| 13 |
+
|
| 14 |
+
LIMIT = 10_000 # bytes
|
| 15 |
+
WHEELS = {"sympy-1.14.0-py3-none-any.whl": "e091cc3e99d2141a0ba2847328f5479b05d94a6635cb96148ccb3f34671bd8f5", "mpmath-1.3.0-py3-none-any.whl": "a0b2b9fe80bbcd81a6647ff13108738cfb482d481d826cc0e02f5b35e5c88d2c"}
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
def read_own(path):
|
| 19 |
+
"""Bytes of the regular file at exactly `path`: every folder on the way and the file are opened without
|
| 20 |
+
following links (a FIFO cannot block it); one link only; at most LIMIT bytes."""
|
| 21 |
+
parts = os.path.abspath(path).split("/")[1:]
|
| 22 |
+
folder = os.open("/", os.O_RDONLY | os.O_DIRECTORY)
|
| 23 |
+
try:
|
| 24 |
+
for part in parts[:-1]:
|
| 25 |
+
inner = os.open(part, os.O_RDONLY | os.O_DIRECTORY | os.O_NOFOLLOW, dir_fd=folder)
|
| 26 |
+
os.close(folder)
|
| 27 |
+
folder = inner
|
| 28 |
+
fd = os.open(parts[-1], os.O_RDONLY | os.O_NOFOLLOW | os.O_NONBLOCK, dir_fd=folder)
|
| 29 |
+
finally:
|
| 30 |
+
os.close(folder)
|
| 31 |
+
with os.fdopen(fd, "rb") as stream:
|
| 32 |
+
info = os.fstat(stream.fileno())
|
| 33 |
+
if not stat.S_ISREG(info.st_mode) or info.st_nlink != 1:
|
| 34 |
+
raise ValueError("answer is not a regular file of its own")
|
| 35 |
+
data = stream.read(LIMIT + 1)
|
| 36 |
+
if len(data) > LIMIT:
|
| 37 |
+
raise ValueError(f"answer file larger than {LIMIT} bytes")
|
| 38 |
+
return data
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
def write_new(path, text):
|
| 42 |
+
try:
|
| 43 |
+
os.unlink(path)
|
| 44 |
+
except FileNotFoundError:
|
| 45 |
+
pass
|
| 46 |
+
fd = os.open(path, os.O_WRONLY | os.O_CREAT | os.O_TRUNC | os.O_NOFOLLOW, 0o644)
|
| 47 |
+
with os.fdopen(fd, "w") as stream:
|
| 48 |
+
stream.write(text)
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
def load_grader(tests):
|
| 52 |
+
lib = tempfile.mkdtemp(prefix="grader-lib-")
|
| 53 |
+
for name, digest in WHEELS.items():
|
| 54 |
+
blob = base64.b64decode(open(os.path.join(tests, name + ".b64"), "rb").read())
|
| 55 |
+
if hashlib.sha256(blob).hexdigest() != digest:
|
| 56 |
+
raise ValueError(f"wheel hash mismatch: {name}")
|
| 57 |
+
with zipfile.ZipFile(io.BytesIO(blob)) as z:
|
| 58 |
+
z.extractall(lib)
|
| 59 |
+
sys.path[:0] = [lib, tests]
|
| 60 |
+
import grader
|
| 61 |
+
return grader
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
def main():
|
| 65 |
+
tests, out = os.environ["TESTS_DIR"], os.environ["VERIFIER_DIR"]
|
| 66 |
+
os.makedirs(out, exist_ok=True)
|
| 67 |
+
write_new(os.path.join(out, "reward.txt"), "0")
|
| 68 |
+
passed, why, submission = False, "grader error", ""
|
| 69 |
+
try:
|
| 70 |
+
try:
|
| 71 |
+
submission = read_own(os.environ["ANSWER"]).decode("utf-8", "replace")
|
| 72 |
+
except FileNotFoundError:
|
| 73 |
+
submission, why = None, "no answer file"
|
| 74 |
+
except (OSError, ValueError) as e:
|
| 75 |
+
submission, why = None, f"answer file rejected: {e}"
|
| 76 |
+
if submission is not None:
|
| 77 |
+
write_new(os.path.join(out, "answer.txt"), submission)
|
| 78 |
+
reference = json.loads(open(os.path.join(tests, "reference.json")).read())["answer"]
|
| 79 |
+
grader = load_grader(tests)
|
| 80 |
+
passed, why = grader.grade_safe(reference, submission, timeout=60) if submission.strip() else (False, "empty")
|
| 81 |
+
except Exception as e:
|
| 82 |
+
passed, why = False, f"grader error: {type(e).__name__}: {str(e)[:200]}"
|
| 83 |
+
if passed:
|
| 84 |
+
write_new(os.path.join(out, "reward.txt"), "1")
|
| 85 |
+
write_new(os.path.join(out, "grade.json"), json.dumps({"passed": passed, "why": why, "submission": (submission or "")[:500]}))
|
| 86 |
+
print("reward:", 1 if passed else 0, "|", why)
|
| 87 |
+
|
| 88 |
+
|
| 89 |
+
if __name__ == "__main__":
|
| 90 |
+
main()
|
tasks/smallmath-0032/tests/grader.py
ADDED
|
@@ -0,0 +1,501 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Strict, exact single-number grader for Harbor math tasks (v2).
|
| 2 |
+
|
| 3 |
+
Contract (one uniform instruction for every task): the final answer is ONE exact number, e.g. 42, -7, 3/8,
|
| 4 |
+
\\frac{3}{8}, 2\\sqrt{3}, \\frac{\\pi}{4}. No units, words, variables, "x =", sets, ranges, percent, or approximations.
|
| 5 |
+
|
| 6 |
+
grade(reference, submission) -> (passed: bool, reason: str)
|
| 7 |
+
grade_safe(reference, submission, timeout=10) -> same, run in a memory-capped subprocess (use this in verifiers)
|
| 8 |
+
|
| 9 |
+
How it works
|
| 10 |
+
- Extract: the last top-level \\boxed{...} / \\fbox{...} (brace-matched; a box nested inside the chosen box is
|
| 11 |
+
rejected), else the whole text. Normalize unicode (NFKC, every dash/minus, superscript digits, zero-width chars,
|
| 12 |
+
BOM), strip markdown bold, "Answer:", $..$, \\(..\\), \\[..\\], a trailing period (repeatedly, so "$5$." works),
|
| 13 |
+
\\left. \\right. (null delimiters), \\left/\\right, LaTeX spacing; plain-text forms sqrt(..), pi, ** become LaTeX.
|
| 14 |
+
Digit grouping (1,024 / 1\\,024 / 1 024 / 1{,}024) is removed only when the whole number is grouped in threes.
|
| 15 |
+
0.\\overline{3} becomes 1/3 exactly.
|
| 16 |
+
- Parse with a small recursive-descent parser over a restricted grammar: numbers, + - * / ^, \\frac (also with TeX
|
| 17 |
+
single-token arguments, \\frac12 = 1/2), \\sqrt{x}, \\sqrt[n]{x} (odd roots of negatives are real: \\sqrt[3]{-8} = -2),
|
| 18 |
+
\\pi, \\cdot, \\times, brackets, implicit multiplication. Functions (\\ln/\\log, \\exp/e, \\sin/\\cos/\\tan,
|
| 19 |
+
\\arcsin/\\arccos/\\arctan) are allowed only if the REFERENCE uses their family, so the problem cannot be restated
|
| 20 |
+
instead of solved (\\lfloor, \\binom, factorials, sums: never). Scientific notation (1e5) is off when the reference
|
| 21 |
+
uses the constant e (so "4e+1" means 4e+1). "3\\frac{1}{6}" is a mixed number in a reference and is rejected as
|
| 22 |
+
ambiguous in a submission. "\\sqrt 16" (TeX: sqrt(1)*6) is rejected. 0^0, division by zero, non-real and huge
|
| 23 |
+
values are rejected; written decimals are exact rationals (0.25 = 1/4; 1.41421356 is NOT sqrt 2).
|
| 24 |
+
- Compare EXACTLY, never with a numeric tolerance (a numeric check can only reject, for speed):
|
| 25 |
+
rationals by equality; algebraic numbers by minimal_polynomial(s - g) == x; expressions with pi as polynomials in
|
| 26 |
+
a symbol T with algebraic coefficients (pi is transcendental); anything with ln/e/trig only if sympy simplifies the
|
| 27 |
+
difference to exactly 0. Anything that cannot be proved equal within the time limit fails.
|
| 28 |
+
"""
|
| 29 |
+
import multiprocessing as mp
|
| 30 |
+
import re
|
| 31 |
+
import unicodedata
|
| 32 |
+
|
| 33 |
+
import sympy
|
| 34 |
+
from sympy import Integer, Rational
|
| 35 |
+
|
| 36 |
+
__version__ = "2"
|
| 37 |
+
MAX_LEN = 1000 # characters of the cleaned answer
|
| 38 |
+
MAX_INT_DIGITS = 1000 # digits of any number literal
|
| 39 |
+
MAX_EXPONENT = 3000 # |exponent| allowed in a power or in scientific notation
|
| 40 |
+
MAX_POW_BITS = 100_000 # estimated size of an exact power before computing it
|
| 41 |
+
MEM_LIMIT = 2 << 30 # extra address space allowed to the grade_safe worker (bytes)
|
| 42 |
+
FUNCS = {"ln": sympy.log, "log": sympy.log, "sin": sympy.sin, "cos": sympy.cos, "tan": sympy.tan,
|
| 43 |
+
"arcsin": sympy.asin, "arccos": sympy.acos, "arctan": sympy.atan, "exp": sympy.exp}
|
| 44 |
+
FAMILIES = [{"ln", "log"}, {"exp", "e"}, {"sin", "cos", "tan"}, {"arcsin", "arccos", "arctan"}]
|
| 45 |
+
TRANSCENDENTAL = (sympy.exp, sympy.log, sympy.sin, sympy.cos, sympy.tan, sympy.asin, sympy.acos, sympy.atan)
|
| 46 |
+
_X, _T = sympy.Symbol("x"), sympy.Symbol("T")
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
class Reject(Exception):
|
| 50 |
+
pass
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
# ---------------------------------------------------------------- extraction and cleaning
|
| 54 |
+
_BOX = re.compile(r"\\(?:boxed|fbox)\s*\{")
|
| 55 |
+
_SUPERSCRIPT = str.maketrans("\u2070\u00b9\u00b2\u00b3\u2074\u2075\u2076\u2077\u2078\u2079\u207b", "0123456789-")
|
| 56 |
+
_DASHES = "\u2010\u2011\u2012\u2013\u2014\u2212\ufe63\uff0d"
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
def _last_top_level_box(text: str):
|
| 60 |
+
"""Content of the last \\boxed{..}/\\fbox{..} that is not inside another box; None if there is no box.
|
| 61 |
+
Rejects an unbalanced last box and a box nested inside the chosen box."""
|
| 62 |
+
spans, i = [], 0
|
| 63 |
+
while True:
|
| 64 |
+
m = _BOX.search(text, i)
|
| 65 |
+
if not m:
|
| 66 |
+
break
|
| 67 |
+
depth, j = 1, m.end()
|
| 68 |
+
while j < len(text) and depth:
|
| 69 |
+
depth += {"{": 1, "}": -1}.get(text[j], 0)
|
| 70 |
+
j += 1
|
| 71 |
+
if depth:
|
| 72 |
+
raise Reject("unbalanced \\boxed")
|
| 73 |
+
spans.append((m.end(), j - 1))
|
| 74 |
+
i = j # continue AFTER this box: inner boxes are not top level
|
| 75 |
+
if not spans:
|
| 76 |
+
return None
|
| 77 |
+
a, b = spans[-1]
|
| 78 |
+
inner = text[a:b]
|
| 79 |
+
if _BOX.search(inner):
|
| 80 |
+
raise Reject("box inside box")
|
| 81 |
+
return inner
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
def _normalize_unicode(t: str) -> str:
|
| 85 |
+
t = re.sub("[\ufeff\u200b\u200c\u200d\u2060\u00ad]", "", t)
|
| 86 |
+
t = re.sub("[\u2070\u00b9\u00b2\u00b3\u2074-\u2079\u207b]+", lambda m: "^{" + m.group().translate(_SUPERSCRIPT) + "}", t)
|
| 87 |
+
for ch in _DASHES:
|
| 88 |
+
t = t.replace(ch, "-")
|
| 89 |
+
t = t.replace("\u00d7", "\\times ").replace("\u00b7", "\\cdot ").replace("\u22c5", "\\cdot ")
|
| 90 |
+
t = t.replace("\u03c0", "\\pi ").replace("\u221a", "\\sqrt")
|
| 91 |
+
return unicodedata.normalize("NFKC", t)
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
def _repeating(m) -> str:
|
| 95 |
+
whole, fixed, rep = m.group(1) or "0", m.group(2), m.group(3)
|
| 96 |
+
num = Integer(int(fixed + rep)) - Integer(int(fixed or "0"))
|
| 97 |
+
den = Integer(10) ** len(fixed) * (Integer(10) ** len(rep) - 1)
|
| 98 |
+
v = Integer(int(whole)) + num / den
|
| 99 |
+
return f"(\\frac{{{v.p}}}{{{v.q}}})"
|
| 100 |
+
|
| 101 |
+
|
| 102 |
+
_NOT_UNIT = re.compile(r"\b(?:or|and|to|for|if|is|not|no|none|either|approx|about|between|each|where|with)\b", re.I)
|
| 103 |
+
_UNIT_TEXT = re.compile(r"\s*\\(?:text|mathrm|mbox|textrm|operatorname)\s*\{\s*([A-Za-z][A-Za-z ./^0-9-]{0,24})\}\s*$")
|
| 104 |
+
_UNIT_WORD = re.compile(r"(?<=[\d})])\s+([A-Za-z]{2,12}(?:\s?/\s?[A-Za-z]{1,8})?(?:\^\{?\d\}?)?)\s*$")
|
| 105 |
+
_DEGREES = re.compile(r"\s*(?:\^\s*\{?\s*\\circ\s*\}?|°|\\degree)\s*$")
|
| 106 |
+
_LHS = re.compile(r"^\s*[A-Za-z](?:_\{?[A-Za-z0-9]+\}?)?\s*=\s*(?=[^=]+$)")
|
| 107 |
+
|
| 108 |
+
|
| 109 |
+
def strip_wrappers(t: str) -> str:
|
| 110 |
+
"""Remove a wrapper around ONE value: trailing units (30 ft/s, 111 meters, \\sqrt{109}\\text{ m}), a degree sign,
|
| 111 |
+
or a single 'n =' prefix. Hedges ('32 \\text{ or } 33'), approximations and multi-part answers are untouched."""
|
| 112 |
+
prev = None
|
| 113 |
+
while t != prev:
|
| 114 |
+
prev = t
|
| 115 |
+
m = _UNIT_TEXT.search(t)
|
| 116 |
+
if m and not _NOT_UNIT.search(m.group(1)) and t[:m.start()].strip():
|
| 117 |
+
t = t[:m.start()].rstrip()
|
| 118 |
+
m = _UNIT_WORD.search(t)
|
| 119 |
+
if m and not _NOT_UNIT.search(m.group(1)):
|
| 120 |
+
t = t[:m.start()].rstrip()
|
| 121 |
+
if t[:-1].strip():
|
| 122 |
+
t = _DEGREES.sub("", t).rstrip()
|
| 123 |
+
t = _LHS.sub("", t)
|
| 124 |
+
return t
|
| 125 |
+
|
| 126 |
+
|
| 127 |
+
def clean(text: str) -> str:
|
| 128 |
+
t = _normalize_unicode((text or "").strip())
|
| 129 |
+
boxed = _last_top_level_box(t)
|
| 130 |
+
if boxed is not None:
|
| 131 |
+
t = boxed
|
| 132 |
+
prev = None
|
| 133 |
+
while t != prev: # peel wrappers in any order: "**Answer:** $5$." -> 5
|
| 134 |
+
prev = t
|
| 135 |
+
t = t.strip()
|
| 136 |
+
t = re.sub(r"^(\*\*|__)(.*)\1$", r"\2", t, flags=re.S).strip()
|
| 137 |
+
t = re.sub(r"^\**\s*(?:the\s+)?(?:final\s+)?answer\s*(?:is)?\s*[:=]?\s*\**\s*", "", t, flags=re.I).strip()
|
| 138 |
+
for a, b in (("$$", "$$"), ("$", "$"), ("\\(", "\\)"), ("\\[", "\\]")):
|
| 139 |
+
if t.startswith(a) and t.endswith(b) and len(t) > len(a) + len(b):
|
| 140 |
+
t = t[len(a):-len(b)].strip()
|
| 141 |
+
t = t.rstrip(". ").strip()
|
| 142 |
+
t = re.sub(r"\\(?:left|right)\.", "", t) # null delimiters
|
| 143 |
+
t = re.sub(r"\\(?:displaystyle|left|right|bigl|bigr|Bigl|Bigr|big|Big)(?![A-Za-z])", "", t)
|
| 144 |
+
t = re.sub(r"\\mathrm\{e\}|\\mathit\{e\}", "e", t)
|
| 145 |
+
t = re.sub(r"\\[dtc]frac(?![A-Za-z])", r"\\frac", t)
|
| 146 |
+
t = re.sub(r"(\d*)\.(\d*)\\overline\{(\d+)\}", _repeating, t)
|
| 147 |
+
t = re.sub(r"(?<=\d)\\[,;! ](?=\d{3}(?!\d))", "", t) # 2\,560\,320 -> 2560320
|
| 148 |
+
t = re.sub(r"\\[,;:! ]|~", " ", t)
|
| 149 |
+
t = strip_wrappers(t) # 30 ft/s, n = 24^5, 30° -> the bare value
|
| 150 |
+
t = re.sub(r"(?<=\d)\s*\{,\}\s*(?=\d{3}(?!\d))", "", t) # 3{,}100
|
| 151 |
+
if re.fullmatch(r"\s*-?\d{1,3}([, ]\d{3})+(\.\d+)?\s*", t) and len(set(re.findall(r"[, ]", t.strip()))) == 1:
|
| 152 |
+
t = re.sub(r"[, ]", "", t) # 3,100 / 1,000.5 / 1 000 (one separator kind)
|
| 153 |
+
t = t.replace("**", "^") # python power
|
| 154 |
+
t = re.sub(r"(?<![\\A-Za-z])sqrt\s*(?=[({])", r"\\sqrt", t) # sqrt(2) -> \sqrt(2)
|
| 155 |
+
t = re.sub(r"(?<![\\A-Za-z])pi(?![A-Za-z])", r"\\pi ", t) # pi/4 -> \pi/4
|
| 156 |
+
return re.sub(r"\s+", " ", t).strip()
|
| 157 |
+
|
| 158 |
+
|
| 159 |
+
# ---------------------------------------------------------------- parser
|
| 160 |
+
TOKEN = re.compile(r"\s*(?:(?P<num>\d+\.\d*|\.\d+|\d+)(?:[eE](?P<exp>[+-]?\d+))?|(?P<cmd>\\[A-Za-z]+)|(?P<sym>[-+*/^(){}\[\]])|(?P<let>[A-Za-z]))")
|
| 161 |
+
NUM_ONLY = re.compile(r"\s*(?P<num>\d+\.\d*|\.\d+|\d+)")
|
| 162 |
+
|
| 163 |
+
|
| 164 |
+
def tokenize(s: str, sci: bool = True):
|
| 165 |
+
"""Tokens are (kind, value, raw). sci=False turns scientific notation off (the reference uses the constant e)."""
|
| 166 |
+
out, pos = [], 0
|
| 167 |
+
while pos < len(s):
|
| 168 |
+
m = TOKEN.match(s, pos)
|
| 169 |
+
if m and not sci and m.group("num") is not None and m.group("exp") is not None:
|
| 170 |
+
m = NUM_ONLY.match(s, pos) # "4e+1" -> 4, e, +, 1
|
| 171 |
+
if not m or m.end() == pos:
|
| 172 |
+
if s[pos:].strip() == "":
|
| 173 |
+
break
|
| 174 |
+
raise Reject(f"unexpected character {s[pos]!r}")
|
| 175 |
+
pos = m.end()
|
| 176 |
+
if m.group("num") is not None:
|
| 177 |
+
num = m.group("num")
|
| 178 |
+
if len(num.replace(".", "")) > MAX_INT_DIGITS:
|
| 179 |
+
raise Reject("number too long")
|
| 180 |
+
val = Rational(num) if "." in num else Integer(int(num))
|
| 181 |
+
exp = m.groupdict().get("exp")
|
| 182 |
+
if exp is not None:
|
| 183 |
+
if abs(int(exp)) > MAX_EXPONENT:
|
| 184 |
+
raise Reject("exponent too large")
|
| 185 |
+
val = val * Rational(10) ** int(exp)
|
| 186 |
+
out.append(("num", val, m.group(0).strip()))
|
| 187 |
+
elif m.group("cmd"):
|
| 188 |
+
out.append(("cmd", m.group("cmd")[1:], m.group("cmd")))
|
| 189 |
+
elif m.group("sym"):
|
| 190 |
+
out.append(("sym", m.group("sym"), m.group("sym")))
|
| 191 |
+
else:
|
| 192 |
+
out.append(("let", m.group("let"), m.group("let")))
|
| 193 |
+
return out
|
| 194 |
+
|
| 195 |
+
|
| 196 |
+
def _mixed_numbers(tokens, is_reference: bool):
|
| 197 |
+
"""N\\frac{a}{b} with integer literals N, a, b: a mixed number (N + a/b) in a reference; ambiguous in a submission."""
|
| 198 |
+
out, i = [], 0
|
| 199 |
+
pat = ["num", ("cmd", "frac"), ("sym", "{"), "num", ("sym", "}"), ("sym", "{"), "num", ("sym", "}")]
|
| 200 |
+
while i < len(tokens):
|
| 201 |
+
win = tokens[i:i + 8]
|
| 202 |
+
ok = len(win) == 8 and all((w[0] == p) if isinstance(p, str) else (w[0], w[1]) == p for w, p in zip(win, pat))
|
| 203 |
+
ok = ok and all(win[k][2].isdigit() for k in (0, 3, 6))
|
| 204 |
+
prev = out[-1] if out else None
|
| 205 |
+
if ok and not (prev and (prev[0] == "cmd" or prev[:2] == ("sym", "^"))):
|
| 206 |
+
if not is_reference:
|
| 207 |
+
raise Reject("ambiguous mixed number (write 7/2, not 3\\frac{1}{2})")
|
| 208 |
+
if win[6][1] == 0:
|
| 209 |
+
raise Reject("division by zero")
|
| 210 |
+
out.append(("num", win[0][1] + win[3][1] / win[6][1], "mixed"))
|
| 211 |
+
i += 8
|
| 212 |
+
continue
|
| 213 |
+
out.append(tokens[i]); i += 1
|
| 214 |
+
return out
|
| 215 |
+
|
| 216 |
+
|
| 217 |
+
def _nonzero(d):
|
| 218 |
+
"""Reject a zero divisor, including a disguised one (sqrt(3+2sqrt2)-1-sqrt2). Numeric check: reject-only."""
|
| 219 |
+
if d == 0 or d.is_zero:
|
| 220 |
+
raise Reject("division by zero")
|
| 221 |
+
if not d.is_Rational:
|
| 222 |
+
try:
|
| 223 |
+
v = sympy.N(d, 60)
|
| 224 |
+
except Exception:
|
| 225 |
+
raise Reject("cannot evaluate divisor")
|
| 226 |
+
if not v.is_Number or abs(v) < sympy.Float("1e-45", 60):
|
| 227 |
+
raise Reject("division by (numerically) zero")
|
| 228 |
+
return d
|
| 229 |
+
|
| 230 |
+
|
| 231 |
+
def _pow_bits(expr) -> int:
|
| 232 |
+
return sum(abs(int(r.p)).bit_length() + int(r.q).bit_length() for r in expr.atoms(sympy.Rational)) or 1
|
| 233 |
+
|
| 234 |
+
|
| 235 |
+
class Parser:
|
| 236 |
+
"""expr := term (('+'|'-') term)* ; term := unary (('*'|'/'|implicit) unary)* ; unary := ('-'|'+') unary | power
|
| 237 |
+
power := atom ('^' exponent)? ; atom := number | group | \\frac A A | \\sqrt[n] A | \\pi | e | func arg"""
|
| 238 |
+
|
| 239 |
+
def __init__(self, tokens, allowed):
|
| 240 |
+
self.t, self.i, self.allowed = list(tokens), 0, allowed
|
| 241 |
+
|
| 242 |
+
def peek(self):
|
| 243 |
+
return self.t[self.i][:2] if self.i < len(self.t) else (None, None)
|
| 244 |
+
|
| 245 |
+
def take(self, kind=None, val=None):
|
| 246 |
+
k, v = self.peek()
|
| 247 |
+
if k is None or (kind and k != kind) or (val is not None and v != val):
|
| 248 |
+
raise Reject(f"malformed near token {self.i}")
|
| 249 |
+
self.i += 1
|
| 250 |
+
return v
|
| 251 |
+
|
| 252 |
+
def parse(self):
|
| 253 |
+
if not self.t:
|
| 254 |
+
raise Reject("empty")
|
| 255 |
+
e = self.expr()
|
| 256 |
+
if self.i != len(self.t):
|
| 257 |
+
raise Reject("trailing input")
|
| 258 |
+
return e
|
| 259 |
+
|
| 260 |
+
def expr(self):
|
| 261 |
+
v = self.term()
|
| 262 |
+
while self.peek() in (("sym", "+"), ("sym", "-")):
|
| 263 |
+
op = self.take()
|
| 264 |
+
r = self.term()
|
| 265 |
+
v = v + r if op == "+" else v - r
|
| 266 |
+
return v
|
| 267 |
+
|
| 268 |
+
def starts_atom(self):
|
| 269 |
+
k, v = self.peek()
|
| 270 |
+
return k == "num" or (k == "sym" and v in "({[") or (k == "cmd" and v in ({"frac", "sqrt", "pi"} | self.allowed)) \
|
| 271 |
+
or (k == "let" and v == "e" and "e" in self.allowed)
|
| 272 |
+
|
| 273 |
+
def term(self):
|
| 274 |
+
v = self.unary()
|
| 275 |
+
while True:
|
| 276 |
+
k, s = self.peek()
|
| 277 |
+
if (k, s) in (("sym", "*"), ("cmd", "cdot"), ("cmd", "times")):
|
| 278 |
+
self.take(); v = v * self.unary()
|
| 279 |
+
elif (k, s) == ("sym", "/"):
|
| 280 |
+
self.take(); v = v / _nonzero(self.unary())
|
| 281 |
+
elif self.starts_atom():
|
| 282 |
+
if self.peek()[0] == "num":
|
| 283 |
+
raise Reject("two numbers side by side") # "2 100" or "\sqrt 16" is malformed, not a product
|
| 284 |
+
v = v * self.power() # implicit multiplication: 2\sqrt{3}, 3\pi, 2(1+x)
|
| 285 |
+
else:
|
| 286 |
+
return v
|
| 287 |
+
|
| 288 |
+
def unary(self):
|
| 289 |
+
if self.peek() == ("sym", "-"):
|
| 290 |
+
self.take(); return -self.unary()
|
| 291 |
+
if self.peek() == ("sym", "+"):
|
| 292 |
+
self.take(); return self.unary()
|
| 293 |
+
return self.power()
|
| 294 |
+
|
| 295 |
+
def power(self):
|
| 296 |
+
base = self.atom()
|
| 297 |
+
if self.peek() != ("sym", "^"):
|
| 298 |
+
return base
|
| 299 |
+
self.take()
|
| 300 |
+
if self.peek() == ("sym", "{"):
|
| 301 |
+
exp = self.group()
|
| 302 |
+
elif self.peek() in (("sym", "-"), ("sym", "+")):
|
| 303 |
+
sign = -1 if self.take() == "-" else 1 # 2^-1
|
| 304 |
+
exp = sign * self.atom()
|
| 305 |
+
else:
|
| 306 |
+
exp = self.atom()
|
| 307 |
+
if self.peek() == ("sym", "^"):
|
| 308 |
+
raise Reject("power tower")
|
| 309 |
+
return self._pow(base, exp)
|
| 310 |
+
|
| 311 |
+
def _pow(self, base, exp):
|
| 312 |
+
if not exp.is_number or exp.is_real is False:
|
| 313 |
+
raise Reject("non-numeric exponent")
|
| 314 |
+
if not exp.is_Rational:
|
| 315 |
+
if base == sympy.E and "e" in self.allowed and abs(sympy.N(exp, 15)) <= MAX_EXPONENT:
|
| 316 |
+
return sympy.exp(exp) # e^{\ln 2}
|
| 317 |
+
raise Reject("irrational exponent not supported")
|
| 318 |
+
if abs(exp) > MAX_EXPONENT:
|
| 319 |
+
raise Reject("exponent too large")
|
| 320 |
+
if base == 0 and exp <= 0:
|
| 321 |
+
raise Reject("0^0 or division by zero")
|
| 322 |
+
if exp < 0:
|
| 323 |
+
_nonzero(base)
|
| 324 |
+
if _pow_bits(base) * max(1, abs(int(exp.p))) > MAX_POW_BITS:
|
| 325 |
+
raise Reject("value too large")
|
| 326 |
+
if base.is_negative and exp.q % 2 == 1 and exp.q > 1:
|
| 327 |
+
return (-1) ** exp.p * (-base) ** exp # real odd root: (-8)^{1/3} = -2
|
| 328 |
+
return base ** exp
|
| 329 |
+
|
| 330 |
+
def group(self):
|
| 331 |
+
open_ = self.take("sym")
|
| 332 |
+
close = {"(": ")", "[": "]", "{": "}"}.get(open_)
|
| 333 |
+
if close is None:
|
| 334 |
+
raise Reject("unexpected symbol")
|
| 335 |
+
v = self.expr()
|
| 336 |
+
self.take("sym", close)
|
| 337 |
+
return v
|
| 338 |
+
|
| 339 |
+
def arg(self):
|
| 340 |
+
"""A TeX macro argument: {..}, (..) / [..] (plain-text style), or ONE token (\\frac12, \\frac\\pi4, \\sqrt2)."""
|
| 341 |
+
k, v = self.peek()
|
| 342 |
+
if k == "sym" and v in "{([":
|
| 343 |
+
return self.group()
|
| 344 |
+
if k == "num":
|
| 345 |
+
raw = self.t[self.i][2]
|
| 346 |
+
if not raw.isdigit():
|
| 347 |
+
raise Reject("ambiguous unbraced argument")
|
| 348 |
+
if len(raw) == 1:
|
| 349 |
+
self.i += 1
|
| 350 |
+
return v
|
| 351 |
+
self.t[self.i] = ("num", Integer(int(raw[1:])), raw[1:]) # TeX takes one digit: \frac12 = 1/2
|
| 352 |
+
return Integer(int(raw[0]))
|
| 353 |
+
if (k == "cmd" and v == "pi") or (k == "let" and v == "e" and "e" in self.allowed):
|
| 354 |
+
return self.atom()
|
| 355 |
+
raise Reject("ambiguous unbraced argument")
|
| 356 |
+
|
| 357 |
+
def atom(self):
|
| 358 |
+
k, v = self.peek()
|
| 359 |
+
if k == "num":
|
| 360 |
+
self.take(); return v
|
| 361 |
+
if k == "sym" and v in "({[":
|
| 362 |
+
return self.group()
|
| 363 |
+
if k == "let" and v == "e" and "e" in self.allowed:
|
| 364 |
+
self.take(); return sympy.E
|
| 365 |
+
if k == "cmd":
|
| 366 |
+
self.take()
|
| 367 |
+
if v == "frac":
|
| 368 |
+
n, d = self.arg(), self.arg()
|
| 369 |
+
return n / _nonzero(d)
|
| 370 |
+
if v == "sqrt":
|
| 371 |
+
if self.peek() == ("sym", "["):
|
| 372 |
+
self.take(); idx = self.expr(); self.take("sym", "]")
|
| 373 |
+
if not (idx.is_Integer and 2 <= idx <= 50):
|
| 374 |
+
raise Reject("bad root index")
|
| 375 |
+
return self._pow(self.arg(), Rational(1, int(idx)))
|
| 376 |
+
return self._pow(self.arg(), Rational(1, 2))
|
| 377 |
+
if v == "pi":
|
| 378 |
+
return sympy.pi
|
| 379 |
+
if v in FUNCS and v in self.allowed:
|
| 380 |
+
if self.peek() in (("sym", "{"), ("sym", "("), ("sym", "[")):
|
| 381 |
+
a = self.group()
|
| 382 |
+
else:
|
| 383 |
+
a = self.power()
|
| 384 |
+
return FUNCS[v](a)
|
| 385 |
+
raise Reject(f"\\{v} not allowed")
|
| 386 |
+
if k == "let":
|
| 387 |
+
raise Reject(f"variable or word {v!r}")
|
| 388 |
+
raise Reject("malformed")
|
| 389 |
+
|
| 390 |
+
|
| 391 |
+
def allowed_from_reference(ref_clean: str) -> set:
|
| 392 |
+
allowed = {c for c in FUNCS if re.search(r"\\" + c + r"(?![A-Za-z])", ref_clean)}
|
| 393 |
+
if re.search(r"(?<![A-Za-z\\])e(?![A-Za-z])", re.sub(r"\\[A-Za-z]+", "", ref_clean)):
|
| 394 |
+
allowed.add("e")
|
| 395 |
+
for fam in FAMILIES:
|
| 396 |
+
if allowed & fam:
|
| 397 |
+
allowed |= fam
|
| 398 |
+
return allowed
|
| 399 |
+
|
| 400 |
+
|
| 401 |
+
def value(text: str, allowed: set, is_reference: bool = False):
|
| 402 |
+
t = clean(text)
|
| 403 |
+
if not t:
|
| 404 |
+
raise Reject("empty")
|
| 405 |
+
if len(t) > MAX_LEN:
|
| 406 |
+
raise Reject("answer too long")
|
| 407 |
+
if re.search(r"\\(?:text|mathrm|mathbf|operatorname|boxed|fbox)\{|\\%|%|\\approx|\\pm|\\mp|=|<|>|\\le|\\ge|\\ne|\\in(?![A-Za-z])|\\infty|\\circ|°|,", t):
|
| 408 |
+
raise Reject("not a single exact number (units/text/relation/percent/approximation/list)")
|
| 409 |
+
tokens = _mixed_numbers(tokenize(t, sci="e" not in allowed), is_reference)
|
| 410 |
+
v = Parser(tokens, allowed).parse()
|
| 411 |
+
if v.has(sympy.zoo, sympy.oo, -sympy.oo, sympy.nan) or v.is_finite is False:
|
| 412 |
+
raise Reject("non-finite value")
|
| 413 |
+
if v.is_real is False:
|
| 414 |
+
raise Reject("not a real number")
|
| 415 |
+
return v
|
| 416 |
+
|
| 417 |
+
|
| 418 |
+
def _is_transcendental(expr) -> bool:
|
| 419 |
+
return expr.has(sympy.E) or any(expr.has(f) for f in TRANSCENDENTAL)
|
| 420 |
+
|
| 421 |
+
|
| 422 |
+
def exact_equal(s, g) -> bool:
|
| 423 |
+
"""True only if s == g is PROVED. Numeric evaluation is used to reject quickly, never to accept."""
|
| 424 |
+
if s.is_Rational and g.is_Rational:
|
| 425 |
+
return s == g
|
| 426 |
+
d = s - g
|
| 427 |
+
if d == 0:
|
| 428 |
+
return True
|
| 429 |
+
try:
|
| 430 |
+
dv, gv = sympy.N(d, 50), sympy.N(g, 50)
|
| 431 |
+
if dv.is_Number and gv.is_Number and abs(dv) > sympy.Float("1e-30", 50) * max(1, abs(gv)):
|
| 432 |
+
return False
|
| 433 |
+
except Exception:
|
| 434 |
+
pass
|
| 435 |
+
if _is_transcendental(d): # ln / e / trig: only an exact simplification to 0 counts
|
| 436 |
+
for cand in (sympy.expand_log(d), d):
|
| 437 |
+
try:
|
| 438 |
+
if sympy.simplify(cand) == 0:
|
| 439 |
+
return True
|
| 440 |
+
except Exception:
|
| 441 |
+
pass
|
| 442 |
+
return False
|
| 443 |
+
if d.has(sympy.pi): # pi is transcendental: d == 0 iff every coefficient in T is 0
|
| 444 |
+
num = sympy.together(sympy.expand(d.subs(sympy.pi, _T))).as_numer_denom()[0]
|
| 445 |
+
poly = sympy.Poly(sympy.expand(num), _T)
|
| 446 |
+
return all(sympy.minimal_polynomial(c, _X) == _X for c in poly.coeffs())
|
| 447 |
+
return sympy.minimal_polynomial(d, _X) == _X
|
| 448 |
+
|
| 449 |
+
|
| 450 |
+
def grade(reference: str, submission: str):
|
| 451 |
+
try:
|
| 452 |
+
ref_clean = clean(reference)
|
| 453 |
+
allowed = allowed_from_reference(ref_clean)
|
| 454 |
+
g = value(reference, allowed, is_reference=True)
|
| 455 |
+
except Reject as e:
|
| 456 |
+
return False, f"reference unusable: {e}"
|
| 457 |
+
except Exception as e:
|
| 458 |
+
return False, f"reference unusable: {type(e).__name__}"
|
| 459 |
+
try:
|
| 460 |
+
s = value(submission, allowed)
|
| 461 |
+
except Reject as e:
|
| 462 |
+
return False, f"format: {e}"
|
| 463 |
+
except (RecursionError, ValueError, TypeError, ZeroDivisionError, OverflowError) as e:
|
| 464 |
+
return False, f"format: {type(e).__name__}"
|
| 465 |
+
try:
|
| 466 |
+
ok = exact_equal(s, g)
|
| 467 |
+
except Exception as e:
|
| 468 |
+
return False, f"could not prove equal ({type(e).__name__})"
|
| 469 |
+
return (True, "exact match") if ok else (False, "wrong value")
|
| 470 |
+
|
| 471 |
+
|
| 472 |
+
def _worker(q, reference, submission):
|
| 473 |
+
try:
|
| 474 |
+
import resource # cap = current address space + MEM_LIMIT (an absolute cap breaks
|
| 475 |
+
vm = 0 # workers forked from big parents: they hang instead of grading)
|
| 476 |
+
for line in open("/proc/self/status"):
|
| 477 |
+
if line.startswith("VmSize:"):
|
| 478 |
+
vm = int(line.split()[1]) * 1024
|
| 479 |
+
resource.setrlimit(resource.RLIMIT_AS, (vm + MEM_LIMIT, vm + MEM_LIMIT))
|
| 480 |
+
except Exception:
|
| 481 |
+
pass
|
| 482 |
+
try:
|
| 483 |
+
q.put(grade(reference, submission))
|
| 484 |
+
except MemoryError:
|
| 485 |
+
q.put((False, "grader out of memory"))
|
| 486 |
+
except Exception as e:
|
| 487 |
+
q.put((False, f"grader error: {type(e).__name__}"))
|
| 488 |
+
|
| 489 |
+
|
| 490 |
+
def grade_safe(reference: str, submission: str, timeout: float = 10.0):
|
| 491 |
+
ctx = mp.get_context("fork")
|
| 492 |
+
q = ctx.Queue()
|
| 493 |
+
p = ctx.Process(target=_worker, args=(q, reference, submission))
|
| 494 |
+
p.start(); p.join(timeout)
|
| 495 |
+
if p.is_alive():
|
| 496 |
+
p.kill(); p.join()
|
| 497 |
+
return False, "timeout"
|
| 498 |
+
try:
|
| 499 |
+
return q.get(timeout=1)
|
| 500 |
+
except Exception:
|
| 501 |
+
return False, "grader crashed"
|
tasks/smallmath-0032/tests/mpmath-1.3.0-py3-none-any.whl.b64
ADDED
|
Binary file (715 kB). View file
|
|
|
tasks/smallmath-0032/tests/reference.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"answer": "420261"}
|
tasks/smallmath-0032/tests/sympy-1.14.0-py3-none-any.whl.b64
ADDED
|
Binary file (8.4 MB). View file
|
|
|
tasks/smallmath-0032/tests/test.sh
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
# Reward 1 if /app/answer.txt holds one exact number equal to the hidden reference (grader.py, exact sympy proof).
|
| 3 |
+
# 0 is written before anything runs, so a crash, a timeout or a missing/linked/oversized answer scores 0.
|
| 4 |
+
# Python runs isolated (-I -S); sympy/mpmath come from the pinned wheels in this directory (hash-checked, unpacked
|
| 5 |
+
# offline into a new directory): nothing is installed and no network is used. ANSWER and VERIFIER_DIR override
|
| 6 |
+
# the paths, to test the grader locally.
|
| 7 |
+
case $0 in */*) here=${0%/*} ;; *) here=. ;; esac
|
| 8 |
+
export ANSWER=${ANSWER:-/app/answer.txt}
|
| 9 |
+
export VERIFIER_DIR=${VERIFIER_DIR:-/logs/verifier}
|
| 10 |
+
export TESTS_DIR=$here
|
| 11 |
+
[ -d "$VERIFIER_DIR" ] && echo 0 > "$VERIFIER_DIR/reward.txt"
|
| 12 |
+
timeout 150 python3 -B -I -S "$here/grade_task.py" || true
|
tasks/smallmath-0036/instruction.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Solve the following math problem.
|
| 2 |
+
|
| 3 |
+
Solve with your own reasoning and available tools. Do not look anything up online or call other models or services.
|
| 4 |
+
|
| 5 |
+
Write ONLY your final answer to `/app/answer.txt` (create `/app` if needed). The answer must be one exact number, such as an integer, fraction, or exact expression. Do not include units, words, variables, or a decimal approximation.
|
| 6 |
+
|
| 7 |
+
Problem:
|
| 8 |
+
|
| 9 |
+
A board initially displays the numbers 1, 2, ..., 2100. Once per second, Nolan selects two numbers from the board, \( a \) and \( b \), removes them, and writes \( \gcd(a, b) \) and \( \operatorname{lcm}(a, b) \) in their place. He continues until every move he could make leaves the numbers on the board unchanged. Determine how many divisors the 2026th smallest positive integer on the board has at that point.
|
tasks/smallmath-0036/solution/solve.sh
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
set -eu
|
| 3 |
+
answer=${ANSWER:-/app/answer.txt}
|
| 4 |
+
mkdir -p "$(dirname "$answer")"
|
| 5 |
+
printf "%s\n" 3840 > "$answer"
|
tasks/smallmath-0036/task.toml
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
schema_version = "1.4"
|
| 2 |
+
artifacts = ["/app/answer.txt"]
|
| 3 |
+
|
| 4 |
+
[task]
|
| 5 |
+
name = "smallmath/smallmath-0036"
|
| 6 |
+
version = "0.1.0"
|
| 7 |
+
description = "SmallMath competition problem with an integer answer."
|
| 8 |
+
keywords = ["math", "competition", "integer"]
|
| 9 |
+
|
| 10 |
+
[metadata]
|
| 11 |
+
category = "math"
|
| 12 |
+
source = "MathArena/smallmath@13ef9727659718de8bcba221cfe8f8a65bf88a99"
|
| 13 |
+
problem_id = "36"
|
| 14 |
+
level = 4
|
| 15 |
+
answer_kind = "integer"
|
| 16 |
+
grader_sha256 = "14122999da68091988faedea6b9ba0bc2b25fad38a3ca54158eb52b1cb2ee7ba"
|
| 17 |
+
|
| 18 |
+
[agent]
|
| 19 |
+
network_mode = "allowlist"
|
| 20 |
+
timeout_sec = 3600
|
| 21 |
+
|
| 22 |
+
[environment]
|
| 23 |
+
docker_image = "docker.io/library/python:3.12-slim"
|
| 24 |
+
cpus = 1
|
| 25 |
+
memory_mb = 2048
|
| 26 |
+
|
| 27 |
+
[verifier]
|
| 28 |
+
network_mode = "allowlist"
|
| 29 |
+
timeout_sec = 180
|
tasks/smallmath-0036/tests/grade_task.py
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Grade the answer file against tests/reference.json. Writes reward.txt (1/0), grade.json and a copy of the
|
| 2 |
+
answer (answer.txt) to VERIFIER_DIR. Any error -> reward 0. The sympy/mpmath wheels ship base64-encoded (plain git
|
| 3 |
+
text: the Hub stores binary files in LFS/Xet, which a plain `git checkout` without git-lfs cannot read)."""
|
| 4 |
+
import base64
|
| 5 |
+
import hashlib
|
| 6 |
+
import io
|
| 7 |
+
import json
|
| 8 |
+
import os
|
| 9 |
+
import stat
|
| 10 |
+
import sys
|
| 11 |
+
import tempfile
|
| 12 |
+
import zipfile
|
| 13 |
+
|
| 14 |
+
LIMIT = 10_000 # bytes
|
| 15 |
+
WHEELS = {"sympy-1.14.0-py3-none-any.whl": "e091cc3e99d2141a0ba2847328f5479b05d94a6635cb96148ccb3f34671bd8f5", "mpmath-1.3.0-py3-none-any.whl": "a0b2b9fe80bbcd81a6647ff13108738cfb482d481d826cc0e02f5b35e5c88d2c"}
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
def read_own(path):
|
| 19 |
+
"""Bytes of the regular file at exactly `path`: every folder on the way and the file are opened without
|
| 20 |
+
following links (a FIFO cannot block it); one link only; at most LIMIT bytes."""
|
| 21 |
+
parts = os.path.abspath(path).split("/")[1:]
|
| 22 |
+
folder = os.open("/", os.O_RDONLY | os.O_DIRECTORY)
|
| 23 |
+
try:
|
| 24 |
+
for part in parts[:-1]:
|
| 25 |
+
inner = os.open(part, os.O_RDONLY | os.O_DIRECTORY | os.O_NOFOLLOW, dir_fd=folder)
|
| 26 |
+
os.close(folder)
|
| 27 |
+
folder = inner
|
| 28 |
+
fd = os.open(parts[-1], os.O_RDONLY | os.O_NOFOLLOW | os.O_NONBLOCK, dir_fd=folder)
|
| 29 |
+
finally:
|
| 30 |
+
os.close(folder)
|
| 31 |
+
with os.fdopen(fd, "rb") as stream:
|
| 32 |
+
info = os.fstat(stream.fileno())
|
| 33 |
+
if not stat.S_ISREG(info.st_mode) or info.st_nlink != 1:
|
| 34 |
+
raise ValueError("answer is not a regular file of its own")
|
| 35 |
+
data = stream.read(LIMIT + 1)
|
| 36 |
+
if len(data) > LIMIT:
|
| 37 |
+
raise ValueError(f"answer file larger than {LIMIT} bytes")
|
| 38 |
+
return data
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
def write_new(path, text):
|
| 42 |
+
try:
|
| 43 |
+
os.unlink(path)
|
| 44 |
+
except FileNotFoundError:
|
| 45 |
+
pass
|
| 46 |
+
fd = os.open(path, os.O_WRONLY | os.O_CREAT | os.O_TRUNC | os.O_NOFOLLOW, 0o644)
|
| 47 |
+
with os.fdopen(fd, "w") as stream:
|
| 48 |
+
stream.write(text)
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
def load_grader(tests):
|
| 52 |
+
lib = tempfile.mkdtemp(prefix="grader-lib-")
|
| 53 |
+
for name, digest in WHEELS.items():
|
| 54 |
+
blob = base64.b64decode(open(os.path.join(tests, name + ".b64"), "rb").read())
|
| 55 |
+
if hashlib.sha256(blob).hexdigest() != digest:
|
| 56 |
+
raise ValueError(f"wheel hash mismatch: {name}")
|
| 57 |
+
with zipfile.ZipFile(io.BytesIO(blob)) as z:
|
| 58 |
+
z.extractall(lib)
|
| 59 |
+
sys.path[:0] = [lib, tests]
|
| 60 |
+
import grader
|
| 61 |
+
return grader
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
def main():
|
| 65 |
+
tests, out = os.environ["TESTS_DIR"], os.environ["VERIFIER_DIR"]
|
| 66 |
+
os.makedirs(out, exist_ok=True)
|
| 67 |
+
write_new(os.path.join(out, "reward.txt"), "0")
|
| 68 |
+
passed, why, submission = False, "grader error", ""
|
| 69 |
+
try:
|
| 70 |
+
try:
|
| 71 |
+
submission = read_own(os.environ["ANSWER"]).decode("utf-8", "replace")
|
| 72 |
+
except FileNotFoundError:
|
| 73 |
+
submission, why = None, "no answer file"
|
| 74 |
+
except (OSError, ValueError) as e:
|
| 75 |
+
submission, why = None, f"answer file rejected: {e}"
|
| 76 |
+
if submission is not None:
|
| 77 |
+
write_new(os.path.join(out, "answer.txt"), submission)
|
| 78 |
+
reference = json.loads(open(os.path.join(tests, "reference.json")).read())["answer"]
|
| 79 |
+
grader = load_grader(tests)
|
| 80 |
+
passed, why = grader.grade_safe(reference, submission, timeout=60) if submission.strip() else (False, "empty")
|
| 81 |
+
except Exception as e:
|
| 82 |
+
passed, why = False, f"grader error: {type(e).__name__}: {str(e)[:200]}"
|
| 83 |
+
if passed:
|
| 84 |
+
write_new(os.path.join(out, "reward.txt"), "1")
|
| 85 |
+
write_new(os.path.join(out, "grade.json"), json.dumps({"passed": passed, "why": why, "submission": (submission or "")[:500]}))
|
| 86 |
+
print("reward:", 1 if passed else 0, "|", why)
|
| 87 |
+
|
| 88 |
+
|
| 89 |
+
if __name__ == "__main__":
|
| 90 |
+
main()
|
tasks/smallmath-0036/tests/grader.py
ADDED
|
@@ -0,0 +1,501 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Strict, exact single-number grader for Harbor math tasks (v2).
|
| 2 |
+
|
| 3 |
+
Contract (one uniform instruction for every task): the final answer is ONE exact number, e.g. 42, -7, 3/8,
|
| 4 |
+
\\frac{3}{8}, 2\\sqrt{3}, \\frac{\\pi}{4}. No units, words, variables, "x =", sets, ranges, percent, or approximations.
|
| 5 |
+
|
| 6 |
+
grade(reference, submission) -> (passed: bool, reason: str)
|
| 7 |
+
grade_safe(reference, submission, timeout=10) -> same, run in a memory-capped subprocess (use this in verifiers)
|
| 8 |
+
|
| 9 |
+
How it works
|
| 10 |
+
- Extract: the last top-level \\boxed{...} / \\fbox{...} (brace-matched; a box nested inside the chosen box is
|
| 11 |
+
rejected), else the whole text. Normalize unicode (NFKC, every dash/minus, superscript digits, zero-width chars,
|
| 12 |
+
BOM), strip markdown bold, "Answer:", $..$, \\(..\\), \\[..\\], a trailing period (repeatedly, so "$5$." works),
|
| 13 |
+
\\left. \\right. (null delimiters), \\left/\\right, LaTeX spacing; plain-text forms sqrt(..), pi, ** become LaTeX.
|
| 14 |
+
Digit grouping (1,024 / 1\\,024 / 1 024 / 1{,}024) is removed only when the whole number is grouped in threes.
|
| 15 |
+
0.\\overline{3} becomes 1/3 exactly.
|
| 16 |
+
- Parse with a small recursive-descent parser over a restricted grammar: numbers, + - * / ^, \\frac (also with TeX
|
| 17 |
+
single-token arguments, \\frac12 = 1/2), \\sqrt{x}, \\sqrt[n]{x} (odd roots of negatives are real: \\sqrt[3]{-8} = -2),
|
| 18 |
+
\\pi, \\cdot, \\times, brackets, implicit multiplication. Functions (\\ln/\\log, \\exp/e, \\sin/\\cos/\\tan,
|
| 19 |
+
\\arcsin/\\arccos/\\arctan) are allowed only if the REFERENCE uses their family, so the problem cannot be restated
|
| 20 |
+
instead of solved (\\lfloor, \\binom, factorials, sums: never). Scientific notation (1e5) is off when the reference
|
| 21 |
+
uses the constant e (so "4e+1" means 4e+1). "3\\frac{1}{6}" is a mixed number in a reference and is rejected as
|
| 22 |
+
ambiguous in a submission. "\\sqrt 16" (TeX: sqrt(1)*6) is rejected. 0^0, division by zero, non-real and huge
|
| 23 |
+
values are rejected; written decimals are exact rationals (0.25 = 1/4; 1.41421356 is NOT sqrt 2).
|
| 24 |
+
- Compare EXACTLY, never with a numeric tolerance (a numeric check can only reject, for speed):
|
| 25 |
+
rationals by equality; algebraic numbers by minimal_polynomial(s - g) == x; expressions with pi as polynomials in
|
| 26 |
+
a symbol T with algebraic coefficients (pi is transcendental); anything with ln/e/trig only if sympy simplifies the
|
| 27 |
+
difference to exactly 0. Anything that cannot be proved equal within the time limit fails.
|
| 28 |
+
"""
|
| 29 |
+
import multiprocessing as mp
|
| 30 |
+
import re
|
| 31 |
+
import unicodedata
|
| 32 |
+
|
| 33 |
+
import sympy
|
| 34 |
+
from sympy import Integer, Rational
|
| 35 |
+
|
| 36 |
+
__version__ = "2"
|
| 37 |
+
MAX_LEN = 1000 # characters of the cleaned answer
|
| 38 |
+
MAX_INT_DIGITS = 1000 # digits of any number literal
|
| 39 |
+
MAX_EXPONENT = 3000 # |exponent| allowed in a power or in scientific notation
|
| 40 |
+
MAX_POW_BITS = 100_000 # estimated size of an exact power before computing it
|
| 41 |
+
MEM_LIMIT = 2 << 30 # extra address space allowed to the grade_safe worker (bytes)
|
| 42 |
+
FUNCS = {"ln": sympy.log, "log": sympy.log, "sin": sympy.sin, "cos": sympy.cos, "tan": sympy.tan,
|
| 43 |
+
"arcsin": sympy.asin, "arccos": sympy.acos, "arctan": sympy.atan, "exp": sympy.exp}
|
| 44 |
+
FAMILIES = [{"ln", "log"}, {"exp", "e"}, {"sin", "cos", "tan"}, {"arcsin", "arccos", "arctan"}]
|
| 45 |
+
TRANSCENDENTAL = (sympy.exp, sympy.log, sympy.sin, sympy.cos, sympy.tan, sympy.asin, sympy.acos, sympy.atan)
|
| 46 |
+
_X, _T = sympy.Symbol("x"), sympy.Symbol("T")
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
class Reject(Exception):
|
| 50 |
+
pass
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
# ---------------------------------------------------------------- extraction and cleaning
|
| 54 |
+
_BOX = re.compile(r"\\(?:boxed|fbox)\s*\{")
|
| 55 |
+
_SUPERSCRIPT = str.maketrans("\u2070\u00b9\u00b2\u00b3\u2074\u2075\u2076\u2077\u2078\u2079\u207b", "0123456789-")
|
| 56 |
+
_DASHES = "\u2010\u2011\u2012\u2013\u2014\u2212\ufe63\uff0d"
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
def _last_top_level_box(text: str):
|
| 60 |
+
"""Content of the last \\boxed{..}/\\fbox{..} that is not inside another box; None if there is no box.
|
| 61 |
+
Rejects an unbalanced last box and a box nested inside the chosen box."""
|
| 62 |
+
spans, i = [], 0
|
| 63 |
+
while True:
|
| 64 |
+
m = _BOX.search(text, i)
|
| 65 |
+
if not m:
|
| 66 |
+
break
|
| 67 |
+
depth, j = 1, m.end()
|
| 68 |
+
while j < len(text) and depth:
|
| 69 |
+
depth += {"{": 1, "}": -1}.get(text[j], 0)
|
| 70 |
+
j += 1
|
| 71 |
+
if depth:
|
| 72 |
+
raise Reject("unbalanced \\boxed")
|
| 73 |
+
spans.append((m.end(), j - 1))
|
| 74 |
+
i = j # continue AFTER this box: inner boxes are not top level
|
| 75 |
+
if not spans:
|
| 76 |
+
return None
|
| 77 |
+
a, b = spans[-1]
|
| 78 |
+
inner = text[a:b]
|
| 79 |
+
if _BOX.search(inner):
|
| 80 |
+
raise Reject("box inside box")
|
| 81 |
+
return inner
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
def _normalize_unicode(t: str) -> str:
|
| 85 |
+
t = re.sub("[\ufeff\u200b\u200c\u200d\u2060\u00ad]", "", t)
|
| 86 |
+
t = re.sub("[\u2070\u00b9\u00b2\u00b3\u2074-\u2079\u207b]+", lambda m: "^{" + m.group().translate(_SUPERSCRIPT) + "}", t)
|
| 87 |
+
for ch in _DASHES:
|
| 88 |
+
t = t.replace(ch, "-")
|
| 89 |
+
t = t.replace("\u00d7", "\\times ").replace("\u00b7", "\\cdot ").replace("\u22c5", "\\cdot ")
|
| 90 |
+
t = t.replace("\u03c0", "\\pi ").replace("\u221a", "\\sqrt")
|
| 91 |
+
return unicodedata.normalize("NFKC", t)
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
def _repeating(m) -> str:
|
| 95 |
+
whole, fixed, rep = m.group(1) or "0", m.group(2), m.group(3)
|
| 96 |
+
num = Integer(int(fixed + rep)) - Integer(int(fixed or "0"))
|
| 97 |
+
den = Integer(10) ** len(fixed) * (Integer(10) ** len(rep) - 1)
|
| 98 |
+
v = Integer(int(whole)) + num / den
|
| 99 |
+
return f"(\\frac{{{v.p}}}{{{v.q}}})"
|
| 100 |
+
|
| 101 |
+
|
| 102 |
+
_NOT_UNIT = re.compile(r"\b(?:or|and|to|for|if|is|not|no|none|either|approx|about|between|each|where|with)\b", re.I)
|
| 103 |
+
_UNIT_TEXT = re.compile(r"\s*\\(?:text|mathrm|mbox|textrm|operatorname)\s*\{\s*([A-Za-z][A-Za-z ./^0-9-]{0,24})\}\s*$")
|
| 104 |
+
_UNIT_WORD = re.compile(r"(?<=[\d})])\s+([A-Za-z]{2,12}(?:\s?/\s?[A-Za-z]{1,8})?(?:\^\{?\d\}?)?)\s*$")
|
| 105 |
+
_DEGREES = re.compile(r"\s*(?:\^\s*\{?\s*\\circ\s*\}?|°|\\degree)\s*$")
|
| 106 |
+
_LHS = re.compile(r"^\s*[A-Za-z](?:_\{?[A-Za-z0-9]+\}?)?\s*=\s*(?=[^=]+$)")
|
| 107 |
+
|
| 108 |
+
|
| 109 |
+
def strip_wrappers(t: str) -> str:
|
| 110 |
+
"""Remove a wrapper around ONE value: trailing units (30 ft/s, 111 meters, \\sqrt{109}\\text{ m}), a degree sign,
|
| 111 |
+
or a single 'n =' prefix. Hedges ('32 \\text{ or } 33'), approximations and multi-part answers are untouched."""
|
| 112 |
+
prev = None
|
| 113 |
+
while t != prev:
|
| 114 |
+
prev = t
|
| 115 |
+
m = _UNIT_TEXT.search(t)
|
| 116 |
+
if m and not _NOT_UNIT.search(m.group(1)) and t[:m.start()].strip():
|
| 117 |
+
t = t[:m.start()].rstrip()
|
| 118 |
+
m = _UNIT_WORD.search(t)
|
| 119 |
+
if m and not _NOT_UNIT.search(m.group(1)):
|
| 120 |
+
t = t[:m.start()].rstrip()
|
| 121 |
+
if t[:-1].strip():
|
| 122 |
+
t = _DEGREES.sub("", t).rstrip()
|
| 123 |
+
t = _LHS.sub("", t)
|
| 124 |
+
return t
|
| 125 |
+
|
| 126 |
+
|
| 127 |
+
def clean(text: str) -> str:
|
| 128 |
+
t = _normalize_unicode((text or "").strip())
|
| 129 |
+
boxed = _last_top_level_box(t)
|
| 130 |
+
if boxed is not None:
|
| 131 |
+
t = boxed
|
| 132 |
+
prev = None
|
| 133 |
+
while t != prev: # peel wrappers in any order: "**Answer:** $5$." -> 5
|
| 134 |
+
prev = t
|
| 135 |
+
t = t.strip()
|
| 136 |
+
t = re.sub(r"^(\*\*|__)(.*)\1$", r"\2", t, flags=re.S).strip()
|
| 137 |
+
t = re.sub(r"^\**\s*(?:the\s+)?(?:final\s+)?answer\s*(?:is)?\s*[:=]?\s*\**\s*", "", t, flags=re.I).strip()
|
| 138 |
+
for a, b in (("$$", "$$"), ("$", "$"), ("\\(", "\\)"), ("\\[", "\\]")):
|
| 139 |
+
if t.startswith(a) and t.endswith(b) and len(t) > len(a) + len(b):
|
| 140 |
+
t = t[len(a):-len(b)].strip()
|
| 141 |
+
t = t.rstrip(". ").strip()
|
| 142 |
+
t = re.sub(r"\\(?:left|right)\.", "", t) # null delimiters
|
| 143 |
+
t = re.sub(r"\\(?:displaystyle|left|right|bigl|bigr|Bigl|Bigr|big|Big)(?![A-Za-z])", "", t)
|
| 144 |
+
t = re.sub(r"\\mathrm\{e\}|\\mathit\{e\}", "e", t)
|
| 145 |
+
t = re.sub(r"\\[dtc]frac(?![A-Za-z])", r"\\frac", t)
|
| 146 |
+
t = re.sub(r"(\d*)\.(\d*)\\overline\{(\d+)\}", _repeating, t)
|
| 147 |
+
t = re.sub(r"(?<=\d)\\[,;! ](?=\d{3}(?!\d))", "", t) # 2\,560\,320 -> 2560320
|
| 148 |
+
t = re.sub(r"\\[,;:! ]|~", " ", t)
|
| 149 |
+
t = strip_wrappers(t) # 30 ft/s, n = 24^5, 30° -> the bare value
|
| 150 |
+
t = re.sub(r"(?<=\d)\s*\{,\}\s*(?=\d{3}(?!\d))", "", t) # 3{,}100
|
| 151 |
+
if re.fullmatch(r"\s*-?\d{1,3}([, ]\d{3})+(\.\d+)?\s*", t) and len(set(re.findall(r"[, ]", t.strip()))) == 1:
|
| 152 |
+
t = re.sub(r"[, ]", "", t) # 3,100 / 1,000.5 / 1 000 (one separator kind)
|
| 153 |
+
t = t.replace("**", "^") # python power
|
| 154 |
+
t = re.sub(r"(?<![\\A-Za-z])sqrt\s*(?=[({])", r"\\sqrt", t) # sqrt(2) -> \sqrt(2)
|
| 155 |
+
t = re.sub(r"(?<![\\A-Za-z])pi(?![A-Za-z])", r"\\pi ", t) # pi/4 -> \pi/4
|
| 156 |
+
return re.sub(r"\s+", " ", t).strip()
|
| 157 |
+
|
| 158 |
+
|
| 159 |
+
# ---------------------------------------------------------------- parser
|
| 160 |
+
TOKEN = re.compile(r"\s*(?:(?P<num>\d+\.\d*|\.\d+|\d+)(?:[eE](?P<exp>[+-]?\d+))?|(?P<cmd>\\[A-Za-z]+)|(?P<sym>[-+*/^(){}\[\]])|(?P<let>[A-Za-z]))")
|
| 161 |
+
NUM_ONLY = re.compile(r"\s*(?P<num>\d+\.\d*|\.\d+|\d+)")
|
| 162 |
+
|
| 163 |
+
|
| 164 |
+
def tokenize(s: str, sci: bool = True):
|
| 165 |
+
"""Tokens are (kind, value, raw). sci=False turns scientific notation off (the reference uses the constant e)."""
|
| 166 |
+
out, pos = [], 0
|
| 167 |
+
while pos < len(s):
|
| 168 |
+
m = TOKEN.match(s, pos)
|
| 169 |
+
if m and not sci and m.group("num") is not None and m.group("exp") is not None:
|
| 170 |
+
m = NUM_ONLY.match(s, pos) # "4e+1" -> 4, e, +, 1
|
| 171 |
+
if not m or m.end() == pos:
|
| 172 |
+
if s[pos:].strip() == "":
|
| 173 |
+
break
|
| 174 |
+
raise Reject(f"unexpected character {s[pos]!r}")
|
| 175 |
+
pos = m.end()
|
| 176 |
+
if m.group("num") is not None:
|
| 177 |
+
num = m.group("num")
|
| 178 |
+
if len(num.replace(".", "")) > MAX_INT_DIGITS:
|
| 179 |
+
raise Reject("number too long")
|
| 180 |
+
val = Rational(num) if "." in num else Integer(int(num))
|
| 181 |
+
exp = m.groupdict().get("exp")
|
| 182 |
+
if exp is not None:
|
| 183 |
+
if abs(int(exp)) > MAX_EXPONENT:
|
| 184 |
+
raise Reject("exponent too large")
|
| 185 |
+
val = val * Rational(10) ** int(exp)
|
| 186 |
+
out.append(("num", val, m.group(0).strip()))
|
| 187 |
+
elif m.group("cmd"):
|
| 188 |
+
out.append(("cmd", m.group("cmd")[1:], m.group("cmd")))
|
| 189 |
+
elif m.group("sym"):
|
| 190 |
+
out.append(("sym", m.group("sym"), m.group("sym")))
|
| 191 |
+
else:
|
| 192 |
+
out.append(("let", m.group("let"), m.group("let")))
|
| 193 |
+
return out
|
| 194 |
+
|
| 195 |
+
|
| 196 |
+
def _mixed_numbers(tokens, is_reference: bool):
|
| 197 |
+
"""N\\frac{a}{b} with integer literals N, a, b: a mixed number (N + a/b) in a reference; ambiguous in a submission."""
|
| 198 |
+
out, i = [], 0
|
| 199 |
+
pat = ["num", ("cmd", "frac"), ("sym", "{"), "num", ("sym", "}"), ("sym", "{"), "num", ("sym", "}")]
|
| 200 |
+
while i < len(tokens):
|
| 201 |
+
win = tokens[i:i + 8]
|
| 202 |
+
ok = len(win) == 8 and all((w[0] == p) if isinstance(p, str) else (w[0], w[1]) == p for w, p in zip(win, pat))
|
| 203 |
+
ok = ok and all(win[k][2].isdigit() for k in (0, 3, 6))
|
| 204 |
+
prev = out[-1] if out else None
|
| 205 |
+
if ok and not (prev and (prev[0] == "cmd" or prev[:2] == ("sym", "^"))):
|
| 206 |
+
if not is_reference:
|
| 207 |
+
raise Reject("ambiguous mixed number (write 7/2, not 3\\frac{1}{2})")
|
| 208 |
+
if win[6][1] == 0:
|
| 209 |
+
raise Reject("division by zero")
|
| 210 |
+
out.append(("num", win[0][1] + win[3][1] / win[6][1], "mixed"))
|
| 211 |
+
i += 8
|
| 212 |
+
continue
|
| 213 |
+
out.append(tokens[i]); i += 1
|
| 214 |
+
return out
|
| 215 |
+
|
| 216 |
+
|
| 217 |
+
def _nonzero(d):
|
| 218 |
+
"""Reject a zero divisor, including a disguised one (sqrt(3+2sqrt2)-1-sqrt2). Numeric check: reject-only."""
|
| 219 |
+
if d == 0 or d.is_zero:
|
| 220 |
+
raise Reject("division by zero")
|
| 221 |
+
if not d.is_Rational:
|
| 222 |
+
try:
|
| 223 |
+
v = sympy.N(d, 60)
|
| 224 |
+
except Exception:
|
| 225 |
+
raise Reject("cannot evaluate divisor")
|
| 226 |
+
if not v.is_Number or abs(v) < sympy.Float("1e-45", 60):
|
| 227 |
+
raise Reject("division by (numerically) zero")
|
| 228 |
+
return d
|
| 229 |
+
|
| 230 |
+
|
| 231 |
+
def _pow_bits(expr) -> int:
|
| 232 |
+
return sum(abs(int(r.p)).bit_length() + int(r.q).bit_length() for r in expr.atoms(sympy.Rational)) or 1
|
| 233 |
+
|
| 234 |
+
|
| 235 |
+
class Parser:
|
| 236 |
+
"""expr := term (('+'|'-') term)* ; term := unary (('*'|'/'|implicit) unary)* ; unary := ('-'|'+') unary | power
|
| 237 |
+
power := atom ('^' exponent)? ; atom := number | group | \\frac A A | \\sqrt[n] A | \\pi | e | func arg"""
|
| 238 |
+
|
| 239 |
+
def __init__(self, tokens, allowed):
|
| 240 |
+
self.t, self.i, self.allowed = list(tokens), 0, allowed
|
| 241 |
+
|
| 242 |
+
def peek(self):
|
| 243 |
+
return self.t[self.i][:2] if self.i < len(self.t) else (None, None)
|
| 244 |
+
|
| 245 |
+
def take(self, kind=None, val=None):
|
| 246 |
+
k, v = self.peek()
|
| 247 |
+
if k is None or (kind and k != kind) or (val is not None and v != val):
|
| 248 |
+
raise Reject(f"malformed near token {self.i}")
|
| 249 |
+
self.i += 1
|
| 250 |
+
return v
|
| 251 |
+
|
| 252 |
+
def parse(self):
|
| 253 |
+
if not self.t:
|
| 254 |
+
raise Reject("empty")
|
| 255 |
+
e = self.expr()
|
| 256 |
+
if self.i != len(self.t):
|
| 257 |
+
raise Reject("trailing input")
|
| 258 |
+
return e
|
| 259 |
+
|
| 260 |
+
def expr(self):
|
| 261 |
+
v = self.term()
|
| 262 |
+
while self.peek() in (("sym", "+"), ("sym", "-")):
|
| 263 |
+
op = self.take()
|
| 264 |
+
r = self.term()
|
| 265 |
+
v = v + r if op == "+" else v - r
|
| 266 |
+
return v
|
| 267 |
+
|
| 268 |
+
def starts_atom(self):
|
| 269 |
+
k, v = self.peek()
|
| 270 |
+
return k == "num" or (k == "sym" and v in "({[") or (k == "cmd" and v in ({"frac", "sqrt", "pi"} | self.allowed)) \
|
| 271 |
+
or (k == "let" and v == "e" and "e" in self.allowed)
|
| 272 |
+
|
| 273 |
+
def term(self):
|
| 274 |
+
v = self.unary()
|
| 275 |
+
while True:
|
| 276 |
+
k, s = self.peek()
|
| 277 |
+
if (k, s) in (("sym", "*"), ("cmd", "cdot"), ("cmd", "times")):
|
| 278 |
+
self.take(); v = v * self.unary()
|
| 279 |
+
elif (k, s) == ("sym", "/"):
|
| 280 |
+
self.take(); v = v / _nonzero(self.unary())
|
| 281 |
+
elif self.starts_atom():
|
| 282 |
+
if self.peek()[0] == "num":
|
| 283 |
+
raise Reject("two numbers side by side") # "2 100" or "\sqrt 16" is malformed, not a product
|
| 284 |
+
v = v * self.power() # implicit multiplication: 2\sqrt{3}, 3\pi, 2(1+x)
|
| 285 |
+
else:
|
| 286 |
+
return v
|
| 287 |
+
|
| 288 |
+
def unary(self):
|
| 289 |
+
if self.peek() == ("sym", "-"):
|
| 290 |
+
self.take(); return -self.unary()
|
| 291 |
+
if self.peek() == ("sym", "+"):
|
| 292 |
+
self.take(); return self.unary()
|
| 293 |
+
return self.power()
|
| 294 |
+
|
| 295 |
+
def power(self):
|
| 296 |
+
base = self.atom()
|
| 297 |
+
if self.peek() != ("sym", "^"):
|
| 298 |
+
return base
|
| 299 |
+
self.take()
|
| 300 |
+
if self.peek() == ("sym", "{"):
|
| 301 |
+
exp = self.group()
|
| 302 |
+
elif self.peek() in (("sym", "-"), ("sym", "+")):
|
| 303 |
+
sign = -1 if self.take() == "-" else 1 # 2^-1
|
| 304 |
+
exp = sign * self.atom()
|
| 305 |
+
else:
|
| 306 |
+
exp = self.atom()
|
| 307 |
+
if self.peek() == ("sym", "^"):
|
| 308 |
+
raise Reject("power tower")
|
| 309 |
+
return self._pow(base, exp)
|
| 310 |
+
|
| 311 |
+
def _pow(self, base, exp):
|
| 312 |
+
if not exp.is_number or exp.is_real is False:
|
| 313 |
+
raise Reject("non-numeric exponent")
|
| 314 |
+
if not exp.is_Rational:
|
| 315 |
+
if base == sympy.E and "e" in self.allowed and abs(sympy.N(exp, 15)) <= MAX_EXPONENT:
|
| 316 |
+
return sympy.exp(exp) # e^{\ln 2}
|
| 317 |
+
raise Reject("irrational exponent not supported")
|
| 318 |
+
if abs(exp) > MAX_EXPONENT:
|
| 319 |
+
raise Reject("exponent too large")
|
| 320 |
+
if base == 0 and exp <= 0:
|
| 321 |
+
raise Reject("0^0 or division by zero")
|
| 322 |
+
if exp < 0:
|
| 323 |
+
_nonzero(base)
|
| 324 |
+
if _pow_bits(base) * max(1, abs(int(exp.p))) > MAX_POW_BITS:
|
| 325 |
+
raise Reject("value too large")
|
| 326 |
+
if base.is_negative and exp.q % 2 == 1 and exp.q > 1:
|
| 327 |
+
return (-1) ** exp.p * (-base) ** exp # real odd root: (-8)^{1/3} = -2
|
| 328 |
+
return base ** exp
|
| 329 |
+
|
| 330 |
+
def group(self):
|
| 331 |
+
open_ = self.take("sym")
|
| 332 |
+
close = {"(": ")", "[": "]", "{": "}"}.get(open_)
|
| 333 |
+
if close is None:
|
| 334 |
+
raise Reject("unexpected symbol")
|
| 335 |
+
v = self.expr()
|
| 336 |
+
self.take("sym", close)
|
| 337 |
+
return v
|
| 338 |
+
|
| 339 |
+
def arg(self):
|
| 340 |
+
"""A TeX macro argument: {..}, (..) / [..] (plain-text style), or ONE token (\\frac12, \\frac\\pi4, \\sqrt2)."""
|
| 341 |
+
k, v = self.peek()
|
| 342 |
+
if k == "sym" and v in "{([":
|
| 343 |
+
return self.group()
|
| 344 |
+
if k == "num":
|
| 345 |
+
raw = self.t[self.i][2]
|
| 346 |
+
if not raw.isdigit():
|
| 347 |
+
raise Reject("ambiguous unbraced argument")
|
| 348 |
+
if len(raw) == 1:
|
| 349 |
+
self.i += 1
|
| 350 |
+
return v
|
| 351 |
+
self.t[self.i] = ("num", Integer(int(raw[1:])), raw[1:]) # TeX takes one digit: \frac12 = 1/2
|
| 352 |
+
return Integer(int(raw[0]))
|
| 353 |
+
if (k == "cmd" and v == "pi") or (k == "let" and v == "e" and "e" in self.allowed):
|
| 354 |
+
return self.atom()
|
| 355 |
+
raise Reject("ambiguous unbraced argument")
|
| 356 |
+
|
| 357 |
+
def atom(self):
|
| 358 |
+
k, v = self.peek()
|
| 359 |
+
if k == "num":
|
| 360 |
+
self.take(); return v
|
| 361 |
+
if k == "sym" and v in "({[":
|
| 362 |
+
return self.group()
|
| 363 |
+
if k == "let" and v == "e" and "e" in self.allowed:
|
| 364 |
+
self.take(); return sympy.E
|
| 365 |
+
if k == "cmd":
|
| 366 |
+
self.take()
|
| 367 |
+
if v == "frac":
|
| 368 |
+
n, d = self.arg(), self.arg()
|
| 369 |
+
return n / _nonzero(d)
|
| 370 |
+
if v == "sqrt":
|
| 371 |
+
if self.peek() == ("sym", "["):
|
| 372 |
+
self.take(); idx = self.expr(); self.take("sym", "]")
|
| 373 |
+
if not (idx.is_Integer and 2 <= idx <= 50):
|
| 374 |
+
raise Reject("bad root index")
|
| 375 |
+
return self._pow(self.arg(), Rational(1, int(idx)))
|
| 376 |
+
return self._pow(self.arg(), Rational(1, 2))
|
| 377 |
+
if v == "pi":
|
| 378 |
+
return sympy.pi
|
| 379 |
+
if v in FUNCS and v in self.allowed:
|
| 380 |
+
if self.peek() in (("sym", "{"), ("sym", "("), ("sym", "[")):
|
| 381 |
+
a = self.group()
|
| 382 |
+
else:
|
| 383 |
+
a = self.power()
|
| 384 |
+
return FUNCS[v](a)
|
| 385 |
+
raise Reject(f"\\{v} not allowed")
|
| 386 |
+
if k == "let":
|
| 387 |
+
raise Reject(f"variable or word {v!r}")
|
| 388 |
+
raise Reject("malformed")
|
| 389 |
+
|
| 390 |
+
|
| 391 |
+
def allowed_from_reference(ref_clean: str) -> set:
|
| 392 |
+
allowed = {c for c in FUNCS if re.search(r"\\" + c + r"(?![A-Za-z])", ref_clean)}
|
| 393 |
+
if re.search(r"(?<![A-Za-z\\])e(?![A-Za-z])", re.sub(r"\\[A-Za-z]+", "", ref_clean)):
|
| 394 |
+
allowed.add("e")
|
| 395 |
+
for fam in FAMILIES:
|
| 396 |
+
if allowed & fam:
|
| 397 |
+
allowed |= fam
|
| 398 |
+
return allowed
|
| 399 |
+
|
| 400 |
+
|
| 401 |
+
def value(text: str, allowed: set, is_reference: bool = False):
|
| 402 |
+
t = clean(text)
|
| 403 |
+
if not t:
|
| 404 |
+
raise Reject("empty")
|
| 405 |
+
if len(t) > MAX_LEN:
|
| 406 |
+
raise Reject("answer too long")
|
| 407 |
+
if re.search(r"\\(?:text|mathrm|mathbf|operatorname|boxed|fbox)\{|\\%|%|\\approx|\\pm|\\mp|=|<|>|\\le|\\ge|\\ne|\\in(?![A-Za-z])|\\infty|\\circ|°|,", t):
|
| 408 |
+
raise Reject("not a single exact number (units/text/relation/percent/approximation/list)")
|
| 409 |
+
tokens = _mixed_numbers(tokenize(t, sci="e" not in allowed), is_reference)
|
| 410 |
+
v = Parser(tokens, allowed).parse()
|
| 411 |
+
if v.has(sympy.zoo, sympy.oo, -sympy.oo, sympy.nan) or v.is_finite is False:
|
| 412 |
+
raise Reject("non-finite value")
|
| 413 |
+
if v.is_real is False:
|
| 414 |
+
raise Reject("not a real number")
|
| 415 |
+
return v
|
| 416 |
+
|
| 417 |
+
|
| 418 |
+
def _is_transcendental(expr) -> bool:
|
| 419 |
+
return expr.has(sympy.E) or any(expr.has(f) for f in TRANSCENDENTAL)
|
| 420 |
+
|
| 421 |
+
|
| 422 |
+
def exact_equal(s, g) -> bool:
|
| 423 |
+
"""True only if s == g is PROVED. Numeric evaluation is used to reject quickly, never to accept."""
|
| 424 |
+
if s.is_Rational and g.is_Rational:
|
| 425 |
+
return s == g
|
| 426 |
+
d = s - g
|
| 427 |
+
if d == 0:
|
| 428 |
+
return True
|
| 429 |
+
try:
|
| 430 |
+
dv, gv = sympy.N(d, 50), sympy.N(g, 50)
|
| 431 |
+
if dv.is_Number and gv.is_Number and abs(dv) > sympy.Float("1e-30", 50) * max(1, abs(gv)):
|
| 432 |
+
return False
|
| 433 |
+
except Exception:
|
| 434 |
+
pass
|
| 435 |
+
if _is_transcendental(d): # ln / e / trig: only an exact simplification to 0 counts
|
| 436 |
+
for cand in (sympy.expand_log(d), d):
|
| 437 |
+
try:
|
| 438 |
+
if sympy.simplify(cand) == 0:
|
| 439 |
+
return True
|
| 440 |
+
except Exception:
|
| 441 |
+
pass
|
| 442 |
+
return False
|
| 443 |
+
if d.has(sympy.pi): # pi is transcendental: d == 0 iff every coefficient in T is 0
|
| 444 |
+
num = sympy.together(sympy.expand(d.subs(sympy.pi, _T))).as_numer_denom()[0]
|
| 445 |
+
poly = sympy.Poly(sympy.expand(num), _T)
|
| 446 |
+
return all(sympy.minimal_polynomial(c, _X) == _X for c in poly.coeffs())
|
| 447 |
+
return sympy.minimal_polynomial(d, _X) == _X
|
| 448 |
+
|
| 449 |
+
|
| 450 |
+
def grade(reference: str, submission: str):
|
| 451 |
+
try:
|
| 452 |
+
ref_clean = clean(reference)
|
| 453 |
+
allowed = allowed_from_reference(ref_clean)
|
| 454 |
+
g = value(reference, allowed, is_reference=True)
|
| 455 |
+
except Reject as e:
|
| 456 |
+
return False, f"reference unusable: {e}"
|
| 457 |
+
except Exception as e:
|
| 458 |
+
return False, f"reference unusable: {type(e).__name__}"
|
| 459 |
+
try:
|
| 460 |
+
s = value(submission, allowed)
|
| 461 |
+
except Reject as e:
|
| 462 |
+
return False, f"format: {e}"
|
| 463 |
+
except (RecursionError, ValueError, TypeError, ZeroDivisionError, OverflowError) as e:
|
| 464 |
+
return False, f"format: {type(e).__name__}"
|
| 465 |
+
try:
|
| 466 |
+
ok = exact_equal(s, g)
|
| 467 |
+
except Exception as e:
|
| 468 |
+
return False, f"could not prove equal ({type(e).__name__})"
|
| 469 |
+
return (True, "exact match") if ok else (False, "wrong value")
|
| 470 |
+
|
| 471 |
+
|
| 472 |
+
def _worker(q, reference, submission):
|
| 473 |
+
try:
|
| 474 |
+
import resource # cap = current address space + MEM_LIMIT (an absolute cap breaks
|
| 475 |
+
vm = 0 # workers forked from big parents: they hang instead of grading)
|
| 476 |
+
for line in open("/proc/self/status"):
|
| 477 |
+
if line.startswith("VmSize:"):
|
| 478 |
+
vm = int(line.split()[1]) * 1024
|
| 479 |
+
resource.setrlimit(resource.RLIMIT_AS, (vm + MEM_LIMIT, vm + MEM_LIMIT))
|
| 480 |
+
except Exception:
|
| 481 |
+
pass
|
| 482 |
+
try:
|
| 483 |
+
q.put(grade(reference, submission))
|
| 484 |
+
except MemoryError:
|
| 485 |
+
q.put((False, "grader out of memory"))
|
| 486 |
+
except Exception as e:
|
| 487 |
+
q.put((False, f"grader error: {type(e).__name__}"))
|
| 488 |
+
|
| 489 |
+
|
| 490 |
+
def grade_safe(reference: str, submission: str, timeout: float = 10.0):
|
| 491 |
+
ctx = mp.get_context("fork")
|
| 492 |
+
q = ctx.Queue()
|
| 493 |
+
p = ctx.Process(target=_worker, args=(q, reference, submission))
|
| 494 |
+
p.start(); p.join(timeout)
|
| 495 |
+
if p.is_alive():
|
| 496 |
+
p.kill(); p.join()
|
| 497 |
+
return False, "timeout"
|
| 498 |
+
try:
|
| 499 |
+
return q.get(timeout=1)
|
| 500 |
+
except Exception:
|
| 501 |
+
return False, "grader crashed"
|
tasks/smallmath-0036/tests/mpmath-1.3.0-py3-none-any.whl.b64
ADDED
|
Binary file (715 kB). View file
|
|
|
tasks/smallmath-0036/tests/reference.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"answer": "3840"}
|
tasks/smallmath-0036/tests/sympy-1.14.0-py3-none-any.whl.b64
ADDED
|
Binary file (8.4 MB). View file
|
|
|
tasks/smallmath-0036/tests/test.sh
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
# Reward 1 if /app/answer.txt holds one exact number equal to the hidden reference (grader.py, exact sympy proof).
|
| 3 |
+
# 0 is written before anything runs, so a crash, a timeout or a missing/linked/oversized answer scores 0.
|
| 4 |
+
# Python runs isolated (-I -S); sympy/mpmath come from the pinned wheels in this directory (hash-checked, unpacked
|
| 5 |
+
# offline into a new directory): nothing is installed and no network is used. ANSWER and VERIFIER_DIR override
|
| 6 |
+
# the paths, to test the grader locally.
|
| 7 |
+
case $0 in */*) here=${0%/*} ;; *) here=. ;; esac
|
| 8 |
+
export ANSWER=${ANSWER:-/app/answer.txt}
|
| 9 |
+
export VERIFIER_DIR=${VERIFIER_DIR:-/logs/verifier}
|
| 10 |
+
export TESTS_DIR=$here
|
| 11 |
+
[ -d "$VERIFIER_DIR" ] && echo 0 > "$VERIFIER_DIR/reward.txt"
|
| 12 |
+
timeout 150 python3 -B -I -S "$here/grade_task.py" || true
|
tasks/smallmath-0037/instruction.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Solve the following math problem.
|
| 2 |
+
|
| 3 |
+
Solve with your own reasoning and available tools. Do not look anything up online or call other models or services.
|
| 4 |
+
|
| 5 |
+
Write ONLY your final answer to `/app/answer.txt` (create `/app` if needed). The answer must be one exact number, such as an integer, fraction, or exact expression. Do not include units, words, variables, or a decimal approximation.
|
| 6 |
+
|
| 7 |
+
Problem:
|
| 8 |
+
|
| 9 |
+
Suppose the positive real numbers \( x, y, \) and \( z \) obey the system
|
| 10 |
+
|
| 11 |
+
\[ xyz = 3, \] \[ (x-y)(y-z)(z-x) = 4, \] \[ (x+y)(y+z)(z+x) = 40. \]
|
| 12 |
+
|
| 13 |
+
Denote the least possible value of $x$ by $m$. Express $m=(a+\sqrt{b})^{-1/3}$ using integers $a$ and $b$, with $b$ positive and squarefree. Determine $a+b$.
|
tasks/smallmath-0037/solution/solve.sh
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
set -eu
|
| 3 |
+
answer=${ANSWER:-/app/answer.txt}
|
| 4 |
+
mkdir -p "$(dirname "$answer")"
|
| 5 |
+
printf "%s\n" 9 > "$answer"
|
tasks/smallmath-0037/task.toml
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
schema_version = "1.4"
|
| 2 |
+
artifacts = ["/app/answer.txt"]
|
| 3 |
+
|
| 4 |
+
[task]
|
| 5 |
+
name = "smallmath/smallmath-0037"
|
| 6 |
+
version = "0.1.0"
|
| 7 |
+
description = "SmallMath competition problem with an integer answer."
|
| 8 |
+
keywords = ["math", "competition", "integer"]
|
| 9 |
+
|
| 10 |
+
[metadata]
|
| 11 |
+
category = "math"
|
| 12 |
+
source = "MathArena/smallmath@13ef9727659718de8bcba221cfe8f8a65bf88a99"
|
| 13 |
+
problem_id = "37"
|
| 14 |
+
level = 5
|
| 15 |
+
answer_kind = "integer"
|
| 16 |
+
grader_sha256 = "14122999da68091988faedea6b9ba0bc2b25fad38a3ca54158eb52b1cb2ee7ba"
|
| 17 |
+
|
| 18 |
+
[agent]
|
| 19 |
+
network_mode = "allowlist"
|
| 20 |
+
timeout_sec = 3600
|
| 21 |
+
|
| 22 |
+
[environment]
|
| 23 |
+
docker_image = "docker.io/library/python:3.12-slim"
|
| 24 |
+
cpus = 1
|
| 25 |
+
memory_mb = 2048
|
| 26 |
+
|
| 27 |
+
[verifier]
|
| 28 |
+
network_mode = "allowlist"
|
| 29 |
+
timeout_sec = 180
|