Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- tasks/construct-ae-p38-factorial-factors-l6-s3/environment/Dockerfile +7 -0
- tasks/construct-ae-p38-factorial-factors-l6-s3/environment/instance.json +1 -0
- tasks/construct-ae-p38-factorial-factors-l6-s3/solution/solve.sh +5 -0
- tasks/construct-ae-p38-factorial-factors-l6-s3/tests/check.py +12 -0
- tasks/construct-ae-p38-factorial-factors-l6-s3/tests/instance.json +1 -0
- tasks/construct-ae-p38-factorial-factors-l6-s3/tests/run.py +127 -0
- tasks/construct-ae-p38-factorial-factors-l6-s3/tests/test.sh +9 -0
- tasks/construct-ae-p38-factorial-factors-l6-s4/environment/Dockerfile +7 -0
- tasks/construct-ae-p38-factorial-factors-l6-s4/environment/instance.json +1 -0
- tasks/construct-ae-p38-factorial-factors-l6-s4/solution/solve.sh +5 -0
- tasks/construct-ae-p38-factorial-factors-l6-s4/tests/check.py +12 -0
- tasks/construct-ae-p38-factorial-factors-l6-s4/tests/instance.json +1 -0
- tasks/construct-ae-p38-factorial-factors-l6-s4/tests/run.py +127 -0
- tasks/construct-ae-p38-factorial-factors-l6-s4/tests/test.sh +9 -0
- tasks/construct-ae-p52-erdos-squarefree-l2-s0/environment/Dockerfile +7 -0
- tasks/construct-ae-p52-erdos-squarefree-l2-s0/environment/instance.json +1 -0
- tasks/construct-ae-p52-erdos-squarefree-l2-s0/solution/solve.sh +5 -0
- tasks/construct-ae-p52-erdos-squarefree-l2-s0/tests/check.py +38 -0
- tasks/construct-ae-p52-erdos-squarefree-l2-s0/tests/instance.json +1 -0
- tasks/construct-ae-p52-erdos-squarefree-l2-s0/tests/run.py +127 -0
- tasks/construct-ae-p52-erdos-squarefree-l2-s0/tests/test.sh +9 -0
- tasks/construct-ae-p52-erdos-squarefree-l2-s7/environment/Dockerfile +7 -0
- tasks/construct-ae-p52-erdos-squarefree-l2-s7/environment/instance.json +1 -0
- tasks/construct-ae-p52-erdos-squarefree-l2-s7/solution/solve.sh +5 -0
- tasks/construct-ae-p52-erdos-squarefree-l2-s7/tests/check.py +38 -0
- tasks/construct-ae-p52-erdos-squarefree-l2-s7/tests/instance.json +1 -0
- tasks/construct-ae-p52-erdos-squarefree-l2-s7/tests/run.py +127 -0
- tasks/construct-ae-p52-erdos-squarefree-l2-s7/tests/test.sh +9 -0
- tasks/construct-ae-p65-imo2025-p6-tiling-l5-s0/environment/Dockerfile +7 -0
- tasks/construct-ae-p65-imo2025-p6-tiling-l5-s0/environment/instance.json +1 -0
- tasks/construct-ae-p65-imo2025-p6-tiling-l5-s0/solution/solve.sh +5 -0
- tasks/construct-ae-p65-imo2025-p6-tiling-l5-s0/tests/check.py +24 -0
- tasks/construct-ae-p65-imo2025-p6-tiling-l5-s0/tests/instance.json +1 -0
- tasks/construct-ae-p65-imo2025-p6-tiling-l5-s0/tests/run.py +127 -0
- tasks/construct-ae-p65-imo2025-p6-tiling-l5-s0/tests/test.sh +9 -0
- tasks/construct-mc-all-interval-l2-s2/environment/Dockerfile +7 -0
- tasks/construct-mc-all-interval-l2-s2/environment/instance.json +1 -0
- tasks/construct-mc-all-interval-l2-s2/solution/solve.sh +5 -0
- tasks/construct-mc-all-interval-l2-s2/tests/check.py +17 -0
- tasks/construct-mc-all-interval-l2-s2/tests/instance.json +1 -0
- tasks/construct-mc-all-interval-l2-s2/tests/run.py +127 -0
- tasks/construct-mc-all-interval-l2-s2/tests/test.sh +9 -0
- tasks/construct-mc-all-interval-l2-s5/environment/Dockerfile +7 -0
- tasks/construct-mc-all-interval-l2-s5/environment/instance.json +1 -0
- tasks/construct-mc-all-interval-l2-s5/solution/solve.sh +5 -0
- tasks/construct-mc-all-interval-l2-s5/tests/check.py +17 -0
- tasks/construct-mc-all-interval-l2-s5/tests/instance.json +1 -0
- tasks/construct-mc-all-interval-l2-s5/tests/run.py +127 -0
- tasks/construct-mc-all-interval-l2-s5/tests/test.sh +9 -0
- tasks/construct-mc-antimagic-square-l2-s0/environment/Dockerfile +7 -0
tasks/construct-ae-p38-factorial-factors-l6-s3/environment/Dockerfile
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11.16-slim
|
| 2 |
+
RUN apt-get update && apt-get install -y --no-install-recommends tmux curl git procps build-essential \
|
| 3 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 4 |
+
RUN pip install --no-cache-dir numpy==2.4.6 scipy==1.17.1 sympy==1.14.0 networkx==3.6.1 \
|
| 5 |
+
python-sat==1.9.dev15 z3-solver==5.1.0.0 PuLP==3.3.2 ortools==9.15.6755
|
| 6 |
+
WORKDIR /workdir
|
| 7 |
+
COPY instance.json /workdir/instance.json
|
tasks/construct-ae-p38-factorial-factors-l6-s3/environment/instance.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"N": 7370, "t": 2398, "family": "ae_p38_factorial_factors", "subset": "construct"}
|
tasks/construct-ae-p38-factorial-factors-l6-s3/solution/solve.sh
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
# oracle: a known valid construction (planted witness or published solution)
|
| 3 |
+
cat > /workdir/answer.json <<'RLMATH_EOF'
|
| 4 |
+
{"factors": [28776, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2399, 2399, 2399, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2402, 2402, 2402, 2402, 2402, 2402, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2403, 2404, 2404, 2404, 2404, 2404, 2404, 2404, 2404, 2404, 2404, 2404, 2404, 2405, 2405, 2405, 2405, 2405, 2405, 2405, 2405, 2405, 2405, 2405, 2405, 2405, 2405, 2405, 2405, 2405, 2405, 2405, 2405, 2405, 2405, 2405, 2406, 2406, 2406, 2406, 2406, 2406, 2406, 2406, 2406, 2406, 2406, 2406, 2406, 2406, 2406, 2406, 2406, 2406, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2408, 2408, 2408, 2408, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2410, 2410, 2410, 2410, 2410, 2410, 2410, 2410, 2410, 2410, 2410, 2410, 2410, 2410, 2410, 2410, 2410, 2410, 2410, 2410, 2410, 2410, 2410, 2410, 2410, 2410, 2410, 2410, 2410, 2410, 2411, 2411, 2411, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2412, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2413, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2414, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2415, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2417, 2417, 2417, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2421, 2421, 2421, 2421, 2421, 2421, 2421, 2421, 2421, 2421, 2421, 2421, 2421, 2421, 2421, 2421, 2421, 2421, 2421, 2421, 2421, 2421, 2421, 2421, 2421, 2421, 2421, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2422, 2423, 2423, 2423, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2424, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2425, 2426, 2426, 2426, 2426, 2426, 2426, 2427, 2427, 2427, 2427, 2427, 2427, 2427, 2427, 2427, 2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2433, 2433, 2433, 2433, 2433, 2433, 2433, 2433, 2433, 2434, 2434, 2434, 2434, 2434, 2434, 2435, 2435, 2435, 2435, 2435, 2435, 2435, 2435, 2435, 2435, 2435, 2435, 2435, 2435, 2435, 2437, 2437, 2437, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2441, 2441, 2441, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2443, 2443, 2443, 2443, 2443, 2443, 2443, 2443, 2443, 2443, 2443, 2443, 2443, 2443, 2443, 2443, 2443, 2443, 2443, 2443, 2443, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2446, 2446, 2446, 2446, 2446, 2446, 2447, 2447, 2447, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2452, 2452, 2452, 2452, 2452, 2452, 2452, 2452, 2452, 2452, 2452, 2452, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2454, 2454, 2454, 2454, 2454, 2454, 2454, 2454, 2454, 2454, 2454, 2454, 2454, 2454, 2454, 2454, 2454, 2454, 2455, 2455, 2455, 2455, 2455, 2455, 2455, 2455, 2455, 2455, 2455, 2455, 2455, 2455, 2455, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2458, 2458, 2458, 2458, 2458, 2459, 2459, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2462, 2462, 2462, 2462, 2462, 2463, 2463, 2463, 2463, 2463, 2463, 2463, 2463, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2467, 2467, 2468, 2468, 2468, 2468, 2468, 2468, 2468, 2468, 2468, 2468, 2468, 2469, 2469, 2469, 2469, 2469, 2469, 2469, 2469, 2471, 2471, 2471, 2471, 2471, 2471, 2471, 2471, 2471, 2471, 2471, 2471, 2471, 2471, 2471, 2471, 2471, 2471, 2471, 2471, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2473, 2473, 2474, 2474, 2474, 2474, 2474, 2476, 2476, 2476, 2476, 2476, 2476, 2476, 2476, 2476, 2476, 2476, 2477, 2477, 2479, 2481, 2481, 2481, 2481, 2481, 2481, 2481, 2481, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2490, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2498, 2498, 2498, 2498, 2498, 2500, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2503, 2503, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2514, 2514, 2514, 2514, 2514, 2514, 2514, 2514, 2514, 2514, 2514, 2514, 2514, 2514, 2514, 2514, 2514, 2515, 2515, 2515, 2515, 2515, 2515, 2515, 2515, 2515, 2515, 2515, 2515, 2515, 2515, 2517, 2517, 2517, 2517, 2517, 2517, 2517, 2517, 2518, 2518, 2518, 2518, 2518, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2521, 2521, 2524, 2524, 2524, 2524, 2524, 2524, 2524, 2524, 2524, 2524, 2524, 2526, 2526, 2526, 2526, 2526, 2526, 2526, 2526, 2526, 2526, 2526, 2526, 2526, 2526, 2526, 2526, 2526, 2528, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2531, 2531, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2537, 2539, 2539, 2542, 2543, 2543, 2545, 2545, 2545, 2545, 2545, 2545, 2545, 2545, 2545, 2545, 2545, 2545, 2545, 2545, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2549, 2549, 2551, 2551, 2554, 2554, 2554, 2554, 2554, 2557, 2557, 2558, 2558, 2558, 2558, 2558, 2559, 2559, 2559, 2559, 2559, 2559, 2559, 2559, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2566, 2566, 2566, 2566, 2566, 2569, 2569, 2569, 2569, 2569, 2569, 2569, 2569, 2569, 2569, 2569, 2569, 2569, 2569, 2569, 2569, 2569, 2569, 2569, 2569, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2571, 2571, 2571, 2571, 2571, 2571, 2571, 2571, 2572, 2572, 2572, 2572, 2572, 2572, 2572, 2572, 2572, 2572, 2572, 2577, 2577, 2577, 2577, 2577, 2577, 2577, 2577, 2578, 2578, 2578, 2578, 2578, 2579, 2579, 2582, 2582, 2582, 2582, 2582, 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2588, 2588, 2588, 2588, 2588, 2588, 2588, 2588, 2588, 2588, 2588, 2589, 2589, 2589, 2589, 2589, 2589, 2589, 2589, 2591, 2591, 2593, 2593, 2594, 2594, 2594, 2594, 2594, 2598, 2598, 2598, 2598, 2598, 2598, 2598, 2598, 2598, 2598, 2598, 2598, 2598, 2598, 2598, 2598, 2598, 2601, 2602, 2602, 2602, 2602, 2602, 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2606, 2606, 2606, 2606, 2606, 2609, 2609, 2611, 2611, 2611, 2611, 2611, 2611, 2611, 2611, 2611, 2611, 2611, 2611, 2611, 2611, 2611, 2611, 2611, 2611, 2611, 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2614, 2614, 2614, 2614, 2614, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2617, 2617, 2621, 2621, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2631, 2631, 2631, 2631, 2631, 2631, 2631, 2631, 2633, 2633, 2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634, 2636, 2636, 2636, 2636, 2636, 2636, 2636, 2636, 2636, 2636, 2636, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2638, 2638, 2638, 2638, 2638, 2642, 2642, 2642, 2642, 2642, 2643, 2643, 2643, 2643, 2643, 2643, 2643, 2643, 2644, 2644, 2644, 2644, 2644, 2644, 2644, 2644, 2644, 2644, 2644, 2647, 2647, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2649, 2649, 2649, 2649, 2649, 2649, 2649, 2649, 2653, 2653, 2653, 2653, 2653, 2653, 2653, 2653, 2653, 2653, 2653, 2653, 2653, 2653, 2653, 2653, 2653, 2653, 2653, 2654, 2654, 2654, 2654, 2654, 2657, 2657, 2658, 2658, 2658, 2658, 2658, 2658, 2658, 2658, 2658, 2658, 2658, 2658, 2658, 2658, 2658, 2658, 2659, 2659, 2661, 2661, 2661, 2661, 2661, 2661, 2661, 2661, 2663, 2663, 2671, 2671, 2677, 2677, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2683, 2683, 2687, 2687, 2689, 2689, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2693, 2693, 2694, 2694, 2694, 2694, 2694, 2694, 2694, 2694, 2694, 2694, 2694, 2694, 2694, 2694, 2694, 2694, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2699, 2699, 2705, 2705, 2705, 2705, 2705, 2705, 2705, 2705, 2705, 2705, 2705, 2705, 2705, 2707, 2707, 2708, 2708, 2708, 2708, 2708, 2708, 2708, 2708, 2708, 2708, 2711, 2711, 2713, 2713, 2719, 2719, 2721, 2721, 2721, 2721, 2721, 2721, 2721, 2721, 2722, 2722, 2722, 2722, 2722, 2723, 2723, 2723, 2723, 2723, 2723, 2723, 2723, 2723, 2723, 2723, 2723, 2723, 2723, 2723, 2723, 2723, 2723, 2729, 2729, 2731, 2731, 2732, 2732, 2732, 2732, 2732, 2732, 2732, 2732, 2732, 2732, 2733, 2733, 2733, 2733, 2733, 2733, 2733, 2733, 2734, 2734, 2734, 2734, 2734, 2735, 2735, 2735, 2735, 2735, 2735, 2735, 2735, 2735, 2735, 2735, 2735, 2735, 2741, 2741, 2742, 2742, 2742, 2742, 2742, 2742, 2742, 2742, 2742, 2742, 2742, 2742, 2742, 2742, 2742, 2742, 2746, 2746, 2746, 2746, 2746, 2749, 2749, 2753, 2753, 2757, 2757, 2757, 2757, 2757, 2757, 2757, 2757, 2762, 2762, 2762, 2762, 2762, 2764, 2764, 2764, 2764, 2764, 2764, 2764, 2764, 2764, 2764, 2766, 2766, 2766, 2766, 2766, 2766, 2766, 2766, 2766, 2766, 2766, 2766, 2766, 2766, 2766, 2767, 2767, 2777, 2777, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2785, 2785, 2785, 2785, 2785, 2785, 2785, 2785, 2785, 2785, 2785, 2785, 2785, 2787, 2787, 2787, 2787, 2787, 2787, 2787, 2789, 2789, 2791, 2791, 2797, 2797, 2798, 2798, 2798, 2798, 2798, 2801, 2801, 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2803, 2803, 2804, 2804, 2804, 2804, 2804, 2804, 2804, 2804, 2804, 2804, 2811, 2811, 2811, 2811, 2811, 2811, 2811, 2815, 2815, 2815, 2815, 2815, 2815, 2815, 2815, 2815, 2815, 2815, 2815, 2815, 2818, 2818, 2818, 2818, 2818, 2819, 2819, 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2833, 2833, 2836, 2836, 2836, 2836, 2836, 2836, 2836, 2836, 2836, 2836, 2837, 2837, 2841, 2841, 2841, 2841, 2841, 2841, 2841, 2843, 2843, 2845, 2845, 2845, 2845, 2845, 2845, 2845, 2845, 2845, 2845, 2845, 2845, 2846, 2846, 2846, 2846, 2846, 2851, 2851, 2854, 2854, 2854, 2854, 2854, 2855, 2855, 2855, 2855, 2855, 2855, 2855, 2855, 2855, 2855, 2855, 2855, 2857, 2857, 2858, 2858, 2858, 2858, 2858, 2859, 2859, 2859, 2859, 2859, 2859, 2859, 2861, 2861, 2866, 2866, 2866, 2866, 2866, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2876, 2876, 2876, 2876, 2876, 2876, 2876, 2876, 2876, 2876, 2878, 2878, 2878, 2878, 2878, 2879, 2879, 2885, 2885, 2885, 2885, 2885, 2885, 2885, 2885, 2885, 2885, 2885, 2885, 2887, 2887, 2894, 2894, 2894, 2894, 2894, 2897, 2897, 2901, 2901, 2901, 2901, 2901, 2901, 2901, 2902, 2902, 2902, 2902, 2902, 2903, 2903, 2906, 2906, 2906, 2906, 2906, 2908, 2908, 2908, 2908, 2908, 2908, 2908, 2908, 2908, 2908, 2909, 2909, 2913, 2913, 2913, 2913, 2913, 2913, 2913, 2917, 2917, 2918, 2918, 2918, 2918, 2918, 2927, 2927, 2931, 2931, 2931, 2931, 2931, 2931, 2931, 2932, 2932, 2932, 2932, 2932, 2932, 2932, 2932, 2932, 2932, 2935, 2935, 2935, 2935, 2935, 2935, 2935, 2935, 2935, 2935, 2935, 2935, 2939, 2939, 2942, 2942, 2942, 2942, 2942, 2949, 2949, 2949, 2949, 2949, 2949, 2949, 2953, 2953, 2956, 2956, 2956, 2956, 2956, 2956, 2956, 2956, 2956, 2957, 2957, 2962, 2962, 2962, 2962, 2963, 2963, 2965, 2965, 2965, 2965, 2965, 2965, 2965, 2965, 2965, 2965, 2965, 2965, 2966, 2966, 2966, 2966, 2969, 2969, 2971, 2971, 2972, 2972, 2972, 2972, 2972, 2972, 2972, 2972, 2972, 2973, 2973, 2973, 2973, 2973, 2973, 2973, 2974, 2974, 2974, 2974, 2978, 2978, 2978, 2978, 2986, 2986, 2986, 2986, 2991, 2991, 2991, 2991, 2991, 2991, 2991, 2995, 2995, 2995, 2995, 2995, 2995, 2995, 2995, 2995, 2995, 2995, 2995, 2998, 2998, 2998, 2998, 2999, 2999, 3001, 3001, 3004, 3004, 3004, 3004, 3004, 3004, 3004, 3004, 3004, 3011, 3011, 3019, 3019, 3022, 3022, 3022, 3022, 3023, 3023, 3027, 3027, 3027, 3027, 3027, 3027, 3027, 3028, 3028, 3028, 3028, 3028, 3028, 3028, 3028, 3028, 3037, 3037, 3039, 3039, 3039, 3039, 3039, 3039, 3039, 3041, 3041, 3044, 3044, 3044, 3044, 3044, 3044, 3044, 3044, 3044, 3046, 3046, 3046, 3046, 3049, 3049, 3057, 3057, 3057, 3057, 3057, 3057, 3057, 3061, 3061, 3062, 3062, 3062, 3062, 3063, 3063, 3063, 3063, 3063, 3063, 3063, 3067, 3067, 3076, 3076, 3076, 3076, 3076, 3076, 3076, 3076, 3076, 3079, 3079, 3083, 3083, 3086, 3086, 3086, 3086, 3089, 3089, 3092, 3092, 3092, 3092, 3092, 3092, 3092, 3092, 3092, 3093, 3093, 3093, 3093, 3093, 3093, 3093, 3098, 3098, 3098, 3098, 3099, 3099, 3099, 3099, 3099, 3099, 3099, 3106, 3106, 3106, 3106, 3109, 3109, 3117, 3117, 3117, 3117, 3117, 3117, 3117, 3118, 3118, 3118, 3118, 3119, 3119, 3121, 3121, 3134, 3134, 3134, 3134, 3137, 3137, 3142, 3142, 3142, 3142, 3147, 3147, 3147, 3147, 3147, 3147, 3147, 3148, 3148, 3148, 3148, 3148, 3148, 3148, 3148, 3148, 3153, 3153, 3153, 3153, 3153, 3153, 3153, 3158, 3158, 3158, 3158, 3163, 3163, 3166, 3166, 3166, 3166, 3167, 3167, 3169, 3169, 3181, 3181, 3183, 3183, 3183, 3183, 3183, 3183, 3187, 3187, 3188, 3188, 3188, 3188, 3188, 3188, 3188, 3188, 3188, 3189, 3189, 3189, 3189, 3189, 3189, 3191, 3191, 3194, 3194, 3194, 3194, 3202, 3202, 3202, 3202, 3203, 3203, 3207, 3207, 3207, 3207, 3207, 3207, 3209, 3209, 3214, 3214, 3214, 3214, 3217, 3217, 3218, 3218, 3218, 3218, 3221, 3221, 3226, 3226, 3226, 3226, 3229, 3229, 3238, 3238, 3238, 3238, 3242, 3242, 3242, 3242, 3251, 3251, 3253, 3253, 3254, 3254, 3254, 3254, 3257, 3257, 3259, 3259, 3261, 3261, 3261, 3261, 3261, 3261, 3271, 3271, 3273, 3273, 3273, 3273, 3273, 3273, 3274, 3274, 3274, 3274, 3279, 3279, 3279, 3279, 3279, 3279, 3291, 3291, 3291, 3291, 3291, 3291, 3299, 3299, 3301, 3301, 3307, 3307, 3309, 3309, 3309, 3309, 3309, 3309, 3313, 3313, 3314, 3314, 3314, 3314, 3319, 3319, 3323, 3323, 3326, 3326, 3326, 3326, 3327, 3327, 3327, 3327, 3327, 3327, 3329, 3329, 3331, 3331, 3334, 3334, 3334, 3334, 3338, 3338, 3338, 3338, 3343, 3343, 3347, 3347, 3351, 3351, 3351, 3351, 3351, 3351, 3359, 3359, 3361, 3361, 3369, 3369, 3369, 3369, 3369, 3369, 3371, 3371, 3373, 3373, 3386, 3386, 3386, 3386, 3387, 3387, 3387, 3387, 3387, 3387, 3389, 3389, 3391, 3391, 3394, 3394, 3394, 3394, 3398, 3398, 3398, 3398, 3407, 3407, 3413, 3413, 3418, 3418, 3418, 3418, 3433, 3433, 3442, 3442, 3442, 3442, 3446, 3446, 3446, 3446, 3449, 3449, 3453, 3453, 3453, 3453, 3453, 3453, 3457, 3457, 3459, 3459, 3459, 3459, 3459, 3459, 3461, 3461, 3463, 3463, 3466, 3466, 3466, 3466, 3467, 3467, 3469, 3469, 3482, 3482, 3482, 3482, 3489, 3489, 3489, 3489, 3489, 3489, 3491, 3491, 3494, 3494, 3494, 3494, 3499, 3499, 3506, 3506, 3506, 3506, 3511, 3511, 3513, 3513, 3513, 3513, 3513, 3513, 3517, 3517, 3518, 3518, 3518, 3518, 3527, 3527, 3529, 3529, 3533, 3533, 3539, 3539, 3541, 3541, 3543, 3543, 3543, 3543, 3543, 3543, 3547, 3547, 3554, 3554, 3554, 3554, 3557, 3557, 3559, 3559, 3561, 3561, 3561, 3561, 3561, 3561, 3566, 3566, 3566, 3566, 3571, 3571, 3574, 3574, 3574, 3574, 3578, 3578, 3578, 3578, 3579, 3579, 3579, 3579, 3579, 3579, 3581, 3581, 3583, 3583, 3593, 3593, 3602, 3602, 3602, 3602, 3607, 3607, 3613, 3613, 3617, 3617, 3622, 3622, 3622, 3622, 3623, 3623, 3631, 3631, 3637, 3637, 3643, 3643, 3646, 3646, 3646, 3646, 3659, 3659, 3662, 3662, 3662, 3662, 3671, 3671, 3673, 3673, 3677, 3677, 3691, 3694, 3694, 3694, 3697, 3701, 3709, 3719, 3722, 3722, 3722, 3727, 3733, 3734, 3734, 3734, 3739, 3742, 3742, 3742, 3746, 3746, 3746, 3754, 3754, 3754, 3758, 3758, 3758, 3761, 3767, 3769, 3778, 3778, 3778, 3779, 3793, 3797, 3802, 3802, 3802, 3803, 3814, 3814, 3814, 3821, 3823, 3826, 3826, 3826, 3833, 3847, 3851, 3853, 3862, 3862, 3862, 3863, 3866, 3866, 3866, 3877, 3881, 3889, 3898, 3898, 3898, 3902, 3902, 3902, 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3946, 3946, 3946, 3947, 3958, 3958, 3958, 3967, 3974, 3974, 3974, 3986, 3986, 3986, 3989, 3994, 3994, 3994, 3998, 3998, 3998, 4001, 4003, 4006, 4006, 4006, 4007, 4013, 4019, 4021, 4022, 4022, 4022, 4027, 4034, 4034, 4034, 4049, 4051, 4054, 4054, 4054, 4057, 4058, 4058, 4058, 4073, 4078, 4078, 4078, 4079, 4091, 4093, 4099, 4106, 4106, 4106, 4111, 4126, 4126, 4126, 4127, 4129, 4133, 4138, 4138, 4138, 4139, 4153, 4157, 4159, 4162, 4162, 4162, 4166, 4166, 4166, 4174, 4174, 4174, 4177, 4178, 4178, 4178, 4198, 4198, 4198, 4201, 4211, 4217, 4219, 4222, 4222, 4222, 4226, 4226, 4226, 4229, 4231, 4241, 4243, 4253, 4258, 4258, 4258, 4259, 4261, 4262, 4262, 4262, 4271, 4273, 4274, 4274, 4274, 4282, 4282, 4282, 4283, 4286, 4286, 4286, 4289, 4297, 4306, 4306, 4306, 4322, 4322, 4322, 4327, 4337, 4339, 4349, 4357, 4358, 4358, 4358, 4363, 4373, 4391, 4397, 4406, 4406, 4406, 4409, 4414, 4414, 4414, 4421, 4423, 4426, 4426, 4426, 4441, 4442, 4442, 4442, 4447, 4451, 4457, 4463, 4474, 4474, 4474, 4478, 4478, 4478, 4481, 4483, 4486, 4486, 4486, 4493, 4502, 4502, 4502, 4507, 4513, 4517, 4519, 4523, 4534, 4534, 4534, 4538, 4538, 4538, 4546, 4546, 4546, 4547, 4549, 4561, 4562, 4562, 4562, 4567, 4574, 4574, 4574, 4583, 4586, 4586, 4586, 4591, 4594, 4594, 4594, 4597, 4603, 4618, 4618, 4618, 4621, 4622, 4622, 4622, 4637, 4639, 4643, 4649, 4651, 4657, 4663, 4666, 4666, 4666, 4673, 4678, 4678, 4678, 4679, 4682, 4682, 4682, 4691, 4694, 4694, 4694, 4702, 4702, 4702, 4703, 4714, 4714, 4714, 4721, 4723, 4729, 4733, 4742, 4742, 4742, 4751, 4754, 4754, 4754, 4759, 4762, 4762, 4762, 4766, 4766, 4766, 4778, 4778, 4778, 4783, 4786, 4786, 4786, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369]}
|
| 5 |
+
RLMATH_EOF
|
tasks/construct-ae-p38-factorial-factors-l6-s3/tests/check.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Factor N! into N factors, each >= t (AlphaEvolve problem 38 / OEIS A034258). Exact big-integer check."""
|
| 2 |
+
import math
|
| 3 |
+
|
| 4 |
+
from run import Invalid, int_list
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
def check(inst, ans):
|
| 8 |
+
n, t = inst["N"], inst["t"]
|
| 9 |
+
f = int_list(ans.get("factors"), n, t, None, "factors")
|
| 10 |
+
if math.prod(f) != math.factorial(n):
|
| 11 |
+
raise Invalid(f"the product of the factors is not {n}!")
|
| 12 |
+
return None, {"min_factor": min(f)}
|
tasks/construct-ae-p38-factorial-factors-l6-s3/tests/instance.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"N": 7370, "t": 2398, "family": "ae_p38_factorial_factors", "subset": "construct"}
|
tasks/construct-ae-p38-factorial-factors-l6-s3/tests/run.py
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""rlmath runtime grader. Copied into every task as /tests/run.py next to /tests/check.py.
|
| 2 |
+
|
| 3 |
+
Deterministic; no LLM in the reward path. Runs with python3 + numpy/scipy/sympy/networkx only.
|
| 4 |
+
|
| 5 |
+
python3 /tests/run.py /tests/instance.json /workdir/answer.json
|
| 6 |
+
|
| 7 |
+
Prints the reward in [0, 1] and writes /logs/verifier/details.json when that directory exists.
|
| 8 |
+
|
| 9 |
+
check.py must define check(inst, ans) -> (value, extra_dict) and raise Invalid for a bad answer.
|
| 10 |
+
construct : value is ignored; a returned check means the witness is valid -> reward 1.0
|
| 11 |
+
optimize : value is the raw objective; reward = 0.1 + 0.9 * progress, where
|
| 12 |
+
progress = clip((s - baseline) / (best_known - baseline), 0, 1) (maximize)
|
| 13 |
+
clip((baseline - s) / (baseline - best_known), 0, 1) (minimize)
|
| 14 |
+
inst must carry "direction", "baseline", "best_known".
|
| 15 |
+
"""
|
| 16 |
+
import json
|
| 17 |
+
import math
|
| 18 |
+
import os
|
| 19 |
+
import sys
|
| 20 |
+
|
| 21 |
+
VALID_FLOOR = 0.1
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
class Invalid(Exception):
|
| 25 |
+
pass
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
# ------------------------------------------------------------ input helpers
|
| 29 |
+
|
| 30 |
+
def int_list(v, n=None, lo=None, hi=None, name="list"):
|
| 31 |
+
if not isinstance(v, list):
|
| 32 |
+
raise Invalid(f"{name} must be a list")
|
| 33 |
+
if n is not None and len(v) != n:
|
| 34 |
+
raise Invalid(f"{name} must have length {n}, got {len(v)}")
|
| 35 |
+
for x in v:
|
| 36 |
+
if isinstance(x, bool) or not isinstance(x, int):
|
| 37 |
+
raise Invalid(f"{name} must contain integers only")
|
| 38 |
+
if (lo is not None and x < lo) or (hi is not None and x > hi):
|
| 39 |
+
raise Invalid(f"{name} entry {x} out of range [{lo}, {hi}]")
|
| 40 |
+
return v
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
def as_int(x, name="value", lo=None, hi=None):
|
| 44 |
+
return int_list([x], 1, lo, hi, name)[0]
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
def num(x, name="value"):
|
| 48 |
+
if isinstance(x, bool) or not isinstance(x, (int, float)):
|
| 49 |
+
raise Invalid(f"{name} must be a number")
|
| 50 |
+
if not math.isfinite(x):
|
| 51 |
+
raise Invalid(f"{name} is not finite")
|
| 52 |
+
return float(x)
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
def float_matrix(v, rows=None, cols=None, name="matrix"):
|
| 56 |
+
if not isinstance(v, list) or (rows is not None and len(v) != rows):
|
| 57 |
+
raise Invalid(f"{name} must be a list of {rows} rows")
|
| 58 |
+
out = []
|
| 59 |
+
for r in v:
|
| 60 |
+
if not isinstance(r, list) or (cols is not None and len(r) != cols):
|
| 61 |
+
raise Invalid(f"each row of {name} must have {cols} numbers")
|
| 62 |
+
out.append([num(x, name) for x in r])
|
| 63 |
+
return out
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
def float_list(v, n=None, name="list"):
|
| 67 |
+
if not isinstance(v, list) or (n is not None and len(v) != n):
|
| 68 |
+
raise Invalid(f"{name} must be a list of length {n}")
|
| 69 |
+
return [num(x, name) for x in v]
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
# ------------------------------------------------------------------ reward
|
| 73 |
+
|
| 74 |
+
def optimize_reward(inst, s):
|
| 75 |
+
b, best = inst["baseline"], inst["best_known"]
|
| 76 |
+
if inst.get("progress_scale") == "log":
|
| 77 |
+
# for non-negative losses spanning orders of magnitude (e.g. overlap loss -> 0);
|
| 78 |
+
# progress is measured in log10(value + floor)
|
| 79 |
+
f = inst.get("log_floor", 1e-3)
|
| 80 |
+
b, best, s = (math.log10(max(x, 0.0) + f) for x in (b, best, s))
|
| 81 |
+
if inst["direction"] == "maximize":
|
| 82 |
+
p = (s - b) / (best - b)
|
| 83 |
+
else:
|
| 84 |
+
p = (b - s) / (b - best)
|
| 85 |
+
return VALID_FLOOR + (1 - VALID_FLOOR) * max(0.0, min(1.0, p))
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
def grade(inst, ans, check):
|
| 89 |
+
try:
|
| 90 |
+
if not isinstance(ans, dict):
|
| 91 |
+
raise Invalid("answer must be a JSON object")
|
| 92 |
+
value, extra = check(inst, ans)
|
| 93 |
+
if inst.get("subset") == "optimize":
|
| 94 |
+
s = float(value)
|
| 95 |
+
if not math.isfinite(s):
|
| 96 |
+
raise Invalid("non-finite score")
|
| 97 |
+
return optimize_reward(inst, s), {"valid": True, "raw_score": s, **(extra or {})}
|
| 98 |
+
return 1.0, {"valid": True, **(extra or {})}
|
| 99 |
+
except Invalid as e:
|
| 100 |
+
return 0.0, {"valid": False, "error": str(e)}
|
| 101 |
+
except Exception as e: # any malformed answer
|
| 102 |
+
return 0.0, {"valid": False, "error": f"{type(e).__name__}: {e}"}
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
def main():
|
| 106 |
+
here = os.path.dirname(os.path.abspath(__file__))
|
| 107 |
+
sys.path.insert(0, here)
|
| 108 |
+
# import ourselves as `run` so check.py's `from run import Invalid` is the same class
|
| 109 |
+
import run as R # noqa: E402
|
| 110 |
+
import check as family # noqa: E402
|
| 111 |
+
|
| 112 |
+
inst = json.load(open(sys.argv[1]))
|
| 113 |
+
try:
|
| 114 |
+
ans = json.load(open(sys.argv[2]))
|
| 115 |
+
except Exception as e:
|
| 116 |
+
reward, det = 0.0, {"valid": False, "error": f"unreadable answer: {e}"}
|
| 117 |
+
else:
|
| 118 |
+
reward, det = R.grade(inst, ans, family.check)
|
| 119 |
+
det["reward"] = reward
|
| 120 |
+
if os.path.isdir("/logs/verifier"):
|
| 121 |
+
with open("/logs/verifier/details.json", "w") as f:
|
| 122 |
+
json.dump(det, f)
|
| 123 |
+
print(reward)
|
| 124 |
+
|
| 125 |
+
|
| 126 |
+
if __name__ == "__main__":
|
| 127 |
+
main()
|
tasks/construct-ae-p38-factorial-factors-l6-s3/tests/test.sh
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
mkdir -p /logs/verifier
|
| 3 |
+
if [ ! -s /workdir/answer.json ]; then
|
| 4 |
+
echo '{"valid": false, "error": "no /workdir/answer.json"}' > /logs/verifier/details.json
|
| 5 |
+
echo 0 > /logs/verifier/reward.txt
|
| 6 |
+
exit 0
|
| 7 |
+
fi
|
| 8 |
+
timeout 290 python3 /tests/run.py /tests/instance.json /workdir/answer.json \
|
| 9 |
+
> /logs/verifier/reward.txt 2> /logs/verifier/grader.log || echo 0 > /logs/verifier/reward.txt
|
tasks/construct-ae-p38-factorial-factors-l6-s4/environment/Dockerfile
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11.16-slim
|
| 2 |
+
RUN apt-get update && apt-get install -y --no-install-recommends tmux curl git procps build-essential \
|
| 3 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 4 |
+
RUN pip install --no-cache-dir numpy==2.4.6 scipy==1.17.1 sympy==1.14.0 networkx==3.6.1 \
|
| 5 |
+
python-sat==1.9.dev15 z3-solver==5.1.0.0 PuLP==3.3.2 ortools==9.15.6755
|
| 6 |
+
WORKDIR /workdir
|
| 7 |
+
COPY instance.json /workdir/instance.json
|
tasks/construct-ae-p38-factorial-factors-l6-s4/environment/instance.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"N": 7446, "t": 2426, "family": "ae_p38_factorial_factors", "subset": "construct"}
|
tasks/construct-ae-p38-factorial-factors-l6-s4/solution/solve.sh
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
# oracle: a known valid construction (planted witness or published solution)
|
| 3 |
+
cat > /workdir/answer.json <<'RLMATH_EOF'
|
| 4 |
+
{"factors": [9704, 2426, 2426, 2426, 2426, 2426, 2427, 2427, 2427, 2427, 2427, 2427, 2427, 2427, 2427, 2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2431, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2433, 2433, 2433, 2433, 2433, 2433, 2433, 2433, 2433, 2434, 2434, 2434, 2434, 2434, 2434, 2435, 2435, 2435, 2435, 2435, 2435, 2435, 2435, 2435, 2435, 2435, 2435, 2435, 2435, 2435, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2437, 2437, 2437, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2441, 2441, 2441, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2443, 2443, 2443, 2443, 2443, 2443, 2443, 2443, 2443, 2443, 2443, 2443, 2443, 2443, 2443, 2443, 2443, 2443, 2443, 2443, 2443, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2444, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2445, 2446, 2446, 2446, 2446, 2446, 2446, 2447, 2447, 2447, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2451, 2452, 2452, 2452, 2452, 2452, 2452, 2452, 2452, 2452, 2452, 2452, 2452, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2453, 2454, 2454, 2454, 2454, 2454, 2454, 2454, 2454, 2454, 2454, 2454, 2454, 2454, 2454, 2454, 2454, 2454, 2454, 2455, 2455, 2455, 2455, 2455, 2455, 2455, 2455, 2455, 2455, 2455, 2455, 2455, 2455, 2455, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2456, 2458, 2458, 2458, 2458, 2458, 2458, 2459, 2459, 2459, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2461, 2462, 2462, 2462, 2462, 2462, 2462, 2463, 2463, 2463, 2463, 2463, 2463, 2463, 2463, 2463, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2464, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2467, 2467, 2467, 2468, 2468, 2468, 2468, 2468, 2468, 2468, 2468, 2468, 2468, 2468, 2468, 2469, 2469, 2469, 2469, 2469, 2469, 2469, 2469, 2469, 2471, 2471, 2471, 2471, 2471, 2471, 2471, 2471, 2471, 2471, 2471, 2471, 2471, 2471, 2471, 2471, 2471, 2471, 2471, 2471, 2471, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2473, 2473, 2473, 2474, 2474, 2474, 2474, 2474, 2474, 2475, 2475, 2475, 2475, 2475, 2475, 2475, 2475, 2475, 2475, 2475, 2475, 2476, 2476, 2476, 2476, 2476, 2476, 2476, 2476, 2476, 2476, 2476, 2476, 2477, 2477, 2477, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2478, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2479, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2481, 2481, 2481, 2481, 2481, 2481, 2481, 2481, 2481, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2498, 2498, 2498, 2498, 2498, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2503, 2503, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2504, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2505, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2509, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2511, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2512, 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2514, 2514, 2514, 2514, 2514, 2514, 2514, 2514, 2514, 2514, 2514, 2514, 2514, 2514, 2514, 2514, 2514, 2515, 2515, 2515, 2515, 2515, 2515, 2515, 2515, 2515, 2515, 2515, 2515, 2515, 2515, 2517, 2517, 2517, 2517, 2517, 2517, 2517, 2517, 2518, 2518, 2518, 2518, 2518, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2519, 2521, 2521, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2524, 2524, 2524, 2524, 2524, 2524, 2524, 2524, 2524, 2524, 2524, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2526, 2526, 2526, 2526, 2526, 2526, 2526, 2526, 2526, 2526, 2526, 2526, 2526, 2526, 2526, 2526, 2526, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2531, 2531, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2532, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2533, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2539, 2539, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2543, 2543, 2545, 2545, 2545, 2545, 2545, 2545, 2545, 2545, 2545, 2545, 2545, 2545, 2545, 2545, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2547, 2549, 2549, 2551, 2551, 2554, 2554, 2554, 2554, 2554, 2557, 2557, 2558, 2558, 2558, 2558, 2558, 2559, 2559, 2559, 2559, 2559, 2559, 2559, 2559, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2561, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2566, 2566, 2566, 2566, 2566, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2569, 2569, 2569, 2569, 2569, 2569, 2569, 2569, 2569, 2569, 2569, 2569, 2569, 2569, 2569, 2569, 2569, 2569, 2569, 2569, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2570, 2571, 2571, 2571, 2571, 2571, 2571, 2571, 2571, 2572, 2572, 2572, 2572, 2572, 2572, 2572, 2572, 2572, 2572, 2572, 2575, 2575, 2577, 2577, 2577, 2577, 2577, 2577, 2577, 2577, 2578, 2578, 2578, 2578, 2578, 2579, 2579, 2582, 2582, 2582, 2582, 2582, 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2588, 2588, 2588, 2588, 2588, 2588, 2588, 2588, 2588, 2588, 2588, 2589, 2589, 2589, 2589, 2589, 2589, 2589, 2589, 2591, 2591, 2592, 2593, 2593, 2594, 2594, 2594, 2594, 2594, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2595, 2598, 2598, 2598, 2598, 2598, 2598, 2598, 2598, 2598, 2598, 2598, 2598, 2598, 2598, 2598, 2598, 2598, 2602, 2602, 2602, 2602, 2602, 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2606, 2606, 2606, 2606, 2606, 2609, 2609, 2611, 2611, 2611, 2611, 2611, 2611, 2611, 2611, 2611, 2611, 2611, 2611, 2611, 2611, 2611, 2611, 2611, 2611, 2611, 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2614, 2614, 2614, 2614, 2614, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2617, 2617, 2621, 2621, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2629, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2631, 2631, 2631, 2631, 2631, 2631, 2631, 2631, 2633, 2633, 2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634, 2636, 2636, 2636, 2636, 2636, 2636, 2636, 2636, 2636, 2636, 2636, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2638, 2638, 2638, 2638, 2638, 2642, 2642, 2642, 2642, 2642, 2643, 2643, 2643, 2643, 2643, 2643, 2643, 2643, 2644, 2644, 2644, 2644, 2644, 2644, 2644, 2644, 2644, 2644, 2644, 2647, 2647, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2649, 2649, 2649, 2649, 2649, 2649, 2649, 2649, 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2653, 2653, 2653, 2653, 2653, 2653, 2653, 2653, 2653, 2653, 2653, 2653, 2653, 2653, 2653, 2653, 2653, 2653, 2653, 2654, 2654, 2654, 2654, 2654, 2657, 2657, 2658, 2658, 2658, 2658, 2658, 2658, 2658, 2658, 2658, 2658, 2658, 2658, 2658, 2658, 2658, 2658, 2659, 2659, 2661, 2661, 2661, 2661, 2661, 2661, 2661, 2661, 2663, 2663, 2671, 2671, 2677, 2677, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2683, 2683, 2687, 2687, 2689, 2689, 2690, 2690, 2690, 2690, 2690, 2690, 2690, 2690, 2690, 2690, 2690, 2690, 2690, 2690, 2690, 2690, 2690, 2690, 2690, 2690, 2690, 2690, 2690, 2690, 2690, 2690, 2690, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2693, 2693, 2694, 2694, 2694, 2694, 2694, 2694, 2694, 2694, 2694, 2694, 2694, 2694, 2694, 2694, 2694, 2694, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2699, 2699, 2705, 2705, 2705, 2705, 2705, 2705, 2705, 2705, 2705, 2705, 2705, 2705, 2705, 2707, 2707, 2708, 2708, 2708, 2708, 2708, 2708, 2708, 2708, 2708, 2708, 2711, 2711, 2713, 2713, 2719, 2719, 2721, 2721, 2721, 2721, 2721, 2721, 2721, 2721, 2722, 2722, 2722, 2722, 2722, 2723, 2723, 2723, 2723, 2723, 2723, 2723, 2723, 2723, 2723, 2723, 2723, 2723, 2723, 2723, 2723, 2723, 2723, 2723, 2729, 2729, 2731, 2731, 2732, 2732, 2732, 2732, 2732, 2732, 2732, 2732, 2732, 2732, 2733, 2733, 2733, 2733, 2733, 2733, 2733, 2733, 2734, 2734, 2734, 2734, 2734, 2735, 2735, 2735, 2735, 2735, 2735, 2735, 2735, 2735, 2735, 2735, 2735, 2735, 2741, 2741, 2742, 2742, 2742, 2742, 2742, 2742, 2742, 2742, 2742, 2742, 2742, 2742, 2742, 2742, 2742, 2742, 2746, 2746, 2746, 2746, 2746, 2749, 2749, 2753, 2753, 2757, 2757, 2757, 2757, 2757, 2757, 2757, 2757, 2762, 2762, 2762, 2762, 2762, 2764, 2764, 2764, 2764, 2764, 2764, 2764, 2764, 2764, 2764, 2766, 2766, 2766, 2766, 2766, 2766, 2766, 2766, 2766, 2766, 2766, 2766, 2766, 2766, 2766, 2766, 2767, 2767, 2777, 2777, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2785, 2785, 2785, 2785, 2785, 2785, 2785, 2785, 2785, 2785, 2785, 2785, 2785, 2787, 2787, 2787, 2787, 2787, 2787, 2787, 2787, 2789, 2789, 2791, 2791, 2797, 2797, 2798, 2798, 2798, 2798, 2798, 2801, 2801, 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2803, 2803, 2804, 2804, 2804, 2804, 2804, 2804, 2804, 2804, 2804, 2804, 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2811, 2811, 2811, 2811, 2811, 2811, 2811, 2815, 2815, 2815, 2815, 2815, 2815, 2815, 2815, 2815, 2815, 2815, 2815, 2815, 2818, 2818, 2818, 2818, 2818, 2819, 2819, 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2833, 2833, 2836, 2836, 2836, 2836, 2836, 2836, 2836, 2836, 2836, 2836, 2837, 2837, 2841, 2841, 2841, 2841, 2841, 2841, 2841, 2843, 2843, 2845, 2845, 2845, 2845, 2845, 2845, 2845, 2845, 2845, 2845, 2845, 2845, 2845, 2846, 2846, 2846, 2846, 2846, 2851, 2851, 2854, 2854, 2854, 2854, 2854, 2855, 2855, 2855, 2855, 2855, 2855, 2855, 2855, 2855, 2855, 2855, 2855, 2855, 2857, 2857, 2858, 2858, 2858, 2858, 2858, 2859, 2859, 2859, 2859, 2859, 2859, 2859, 2861, 2861, 2866, 2866, 2866, 2866, 2866, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2876, 2876, 2876, 2876, 2876, 2876, 2876, 2876, 2876, 2876, 2878, 2878, 2878, 2878, 2878, 2879, 2879, 2885, 2885, 2885, 2885, 2885, 2885, 2885, 2885, 2885, 2885, 2885, 2885, 2887, 2887, 2894, 2894, 2894, 2894, 2894, 2897, 2897, 2901, 2901, 2901, 2901, 2901, 2901, 2901, 2902, 2902, 2902, 2902, 2902, 2903, 2903, 2906, 2906, 2906, 2906, 2906, 2908, 2908, 2908, 2908, 2908, 2908, 2908, 2908, 2908, 2908, 2909, 2909, 2913, 2913, 2913, 2913, 2913, 2913, 2913, 2917, 2917, 2918, 2918, 2918, 2918, 2918, 2927, 2927, 2931, 2931, 2931, 2931, 2931, 2931, 2931, 2932, 2932, 2932, 2932, 2932, 2932, 2932, 2932, 2932, 2932, 2935, 2935, 2935, 2935, 2935, 2935, 2935, 2935, 2935, 2935, 2935, 2935, 2939, 2939, 2942, 2942, 2942, 2942, 2942, 2949, 2949, 2949, 2949, 2949, 2949, 2949, 2953, 2953, 2956, 2956, 2956, 2956, 2956, 2956, 2956, 2956, 2956, 2956, 2957, 2957, 2962, 2962, 2962, 2962, 2962, 2963, 2963, 2965, 2965, 2965, 2965, 2965, 2965, 2965, 2965, 2965, 2965, 2965, 2965, 2966, 2966, 2966, 2966, 2966, 2969, 2969, 2971, 2971, 2972, 2972, 2972, 2972, 2972, 2972, 2972, 2972, 2972, 2972, 2973, 2973, 2973, 2973, 2973, 2973, 2973, 2974, 2974, 2974, 2974, 2974, 2978, 2978, 2978, 2978, 2978, 2986, 2986, 2986, 2986, 2991, 2991, 2991, 2991, 2991, 2991, 2991, 2995, 2995, 2995, 2995, 2995, 2995, 2995, 2995, 2995, 2995, 2995, 2995, 2998, 2998, 2998, 2998, 2999, 2999, 3001, 3001, 3004, 3004, 3004, 3004, 3004, 3004, 3004, 3004, 3004, 3005, 3005, 3005, 3005, 3005, 3005, 3005, 3005, 3005, 3005, 3005, 3005, 3011, 3011, 3019, 3019, 3022, 3022, 3022, 3022, 3023, 3023, 3027, 3027, 3027, 3027, 3027, 3027, 3027, 3028, 3028, 3028, 3028, 3028, 3028, 3028, 3028, 3028, 3037, 3037, 3039, 3039, 3039, 3039, 3039, 3039, 3039, 3041, 3041, 3044, 3044, 3044, 3044, 3044, 3044, 3044, 3044, 3044, 3046, 3046, 3046, 3046, 3049, 3049, 3057, 3057, 3057, 3057, 3057, 3057, 3057, 3061, 3061, 3062, 3062, 3062, 3062, 3063, 3063, 3063, 3063, 3063, 3063, 3063, 3067, 3067, 3076, 3076, 3076, 3076, 3076, 3076, 3076, 3076, 3076, 3079, 3079, 3083, 3083, 3086, 3086, 3086, 3086, 3089, 3089, 3092, 3092, 3092, 3092, 3092, 3092, 3092, 3092, 3092, 3093, 3093, 3093, 3093, 3093, 3093, 3093, 3098, 3098, 3098, 3098, 3099, 3099, 3099, 3099, 3099, 3099, 3099, 3106, 3106, 3106, 3106, 3109, 3109, 3117, 3117, 3117, 3117, 3117, 3117, 3117, 3118, 3118, 3118, 3118, 3119, 3119, 3121, 3121, 3134, 3134, 3134, 3134, 3137, 3137, 3142, 3142, 3142, 3142, 3147, 3147, 3147, 3147, 3147, 3147, 3147, 3148, 3148, 3148, 3148, 3148, 3148, 3148, 3148, 3148, 3153, 3153, 3153, 3153, 3153, 3153, 3153, 3158, 3158, 3158, 3158, 3163, 3163, 3166, 3166, 3166, 3166, 3167, 3167, 3169, 3169, 3181, 3181, 3183, 3183, 3183, 3183, 3183, 3183, 3183, 3187, 3187, 3188, 3188, 3188, 3188, 3188, 3188, 3188, 3188, 3188, 3189, 3189, 3189, 3189, 3189, 3189, 3189, 3191, 3191, 3194, 3194, 3194, 3194, 3202, 3202, 3202, 3202, 3203, 3203, 3207, 3207, 3207, 3207, 3207, 3207, 3209, 3209, 3214, 3214, 3214, 3214, 3217, 3217, 3218, 3218, 3218, 3218, 3221, 3221, 3226, 3226, 3226, 3226, 3229, 3229, 3238, 3238, 3238, 3238, 3242, 3242, 3242, 3242, 3251, 3251, 3253, 3253, 3254, 3254, 3254, 3254, 3257, 3257, 3259, 3259, 3261, 3261, 3261, 3261, 3261, 3261, 3271, 3271, 3273, 3273, 3273, 3273, 3273, 3273, 3274, 3274, 3274, 3274, 3279, 3279, 3279, 3279, 3279, 3279, 3291, 3291, 3291, 3291, 3291, 3291, 3299, 3299, 3301, 3301, 3307, 3307, 3309, 3309, 3309, 3309, 3309, 3309, 3313, 3313, 3314, 3314, 3314, 3314, 3319, 3319, 3323, 3323, 3326, 3326, 3326, 3326, 3327, 3327, 3327, 3327, 3327, 3327, 3329, 3329, 3331, 3331, 3334, 3334, 3334, 3334, 3338, 3338, 3338, 3338, 3343, 3343, 3347, 3347, 3351, 3351, 3351, 3351, 3351, 3351, 3359, 3359, 3361, 3361, 3369, 3369, 3369, 3369, 3369, 3369, 3371, 3371, 3373, 3373, 3386, 3386, 3386, 3386, 3387, 3387, 3387, 3387, 3387, 3387, 3389, 3389, 3391, 3391, 3394, 3394, 3394, 3394, 3398, 3398, 3398, 3398, 3407, 3407, 3413, 3413, 3418, 3418, 3418, 3418, 3433, 3433, 3442, 3442, 3442, 3442, 3446, 3446, 3446, 3446, 3449, 3449, 3453, 3453, 3453, 3453, 3453, 3453, 3457, 3457, 3459, 3459, 3459, 3459, 3459, 3459, 3461, 3461, 3463, 3463, 3466, 3466, 3466, 3466, 3467, 3467, 3469, 3469, 3482, 3482, 3482, 3482, 3489, 3489, 3489, 3489, 3489, 3489, 3491, 3491, 3494, 3494, 3494, 3494, 3499, 3499, 3506, 3506, 3506, 3506, 3511, 3511, 3513, 3513, 3513, 3513, 3513, 3513, 3517, 3517, 3518, 3518, 3518, 3518, 3527, 3527, 3529, 3529, 3533, 3533, 3539, 3539, 3541, 3541, 3543, 3543, 3543, 3543, 3543, 3543, 3547, 3547, 3554, 3554, 3554, 3554, 3557, 3557, 3559, 3559, 3561, 3561, 3561, 3561, 3561, 3561, 3566, 3566, 3566, 3566, 3571, 3571, 3574, 3574, 3574, 3574, 3578, 3578, 3578, 3578, 3579, 3579, 3579, 3579, 3579, 3579, 3581, 3581, 3583, 3583, 3593, 3593, 3602, 3602, 3602, 3602, 3603, 3603, 3603, 3603, 3603, 3603, 3607, 3607, 3613, 3613, 3617, 3617, 3622, 3622, 3622, 3622, 3623, 3623, 3631, 3631, 3637, 3637, 3643, 3643, 3646, 3646, 3646, 3646, 3659, 3659, 3662, 3662, 3662, 3662, 3671, 3671, 3673, 3673, 3677, 3677, 3691, 3691, 3694, 3694, 3694, 3694, 3697, 3697, 3701, 3701, 3709, 3709, 3719, 3719, 3722, 3722, 3722, 3722, 3727, 3733, 3734, 3734, 3734, 3739, 3742, 3742, 3742, 3746, 3746, 3746, 3754, 3754, 3754, 3758, 3758, 3758, 3761, 3767, 3769, 3778, 3778, 3778, 3779, 3793, 3797, 3802, 3802, 3802, 3803, 3814, 3814, 3814, 3821, 3823, 3826, 3826, 3826, 3833, 3847, 3851, 3853, 3862, 3862, 3862, 3863, 3866, 3866, 3866, 3877, 3881, 3889, 3898, 3898, 3898, 3902, 3902, 3902, 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3946, 3946, 3946, 3947, 3958, 3958, 3958, 3967, 3974, 3974, 3974, 3986, 3986, 3986, 3989, 3994, 3994, 3994, 3998, 3998, 3998, 4001, 4003, 4006, 4006, 4006, 4007, 4013, 4019, 4021, 4022, 4022, 4022, 4027, 4034, 4034, 4034, 4049, 4051, 4054, 4054, 4054, 4057, 4058, 4058, 4058, 4073, 4078, 4078, 4078, 4079, 4091, 4093, 4099, 4106, 4106, 4106, 4111, 4126, 4126, 4126, 4127, 4129, 4133, 4138, 4138, 4138, 4139, 4153, 4157, 4159, 4162, 4162, 4162, 4166, 4166, 4166, 4174, 4174, 4174, 4177, 4178, 4178, 4178, 4198, 4198, 4198, 4201, 4211, 4217, 4219, 4222, 4222, 4222, 4226, 4226, 4226, 4229, 4231, 4241, 4243, 4253, 4258, 4258, 4258, 4259, 4261, 4262, 4262, 4262, 4271, 4273, 4274, 4274, 4274, 4282, 4282, 4282, 4283, 4286, 4286, 4286, 4289, 4297, 4306, 4306, 4306, 4322, 4322, 4322, 4327, 4337, 4339, 4349, 4357, 4358, 4358, 4358, 4363, 4373, 4391, 4397, 4406, 4406, 4406, 4409, 4414, 4414, 4414, 4421, 4423, 4426, 4426, 4426, 4441, 4442, 4442, 4442, 4447, 4451, 4457, 4463, 4474, 4474, 4474, 4478, 4478, 4478, 4481, 4483, 4486, 4486, 4486, 4493, 4502, 4502, 4502, 4507, 4513, 4517, 4519, 4523, 4534, 4534, 4534, 4538, 4538, 4538, 4546, 4546, 4546, 4547, 4549, 4561, 4562, 4562, 4562, 4567, 4574, 4574, 4574, 4583, 4586, 4586, 4586, 4591, 4594, 4594, 4594, 4597, 4603, 4618, 4618, 4618, 4621, 4622, 4622, 4622, 4637, 4639, 4643, 4649, 4651, 4657, 4663, 4666, 4666, 4666, 4673, 4678, 4678, 4678, 4679, 4682, 4682, 4682, 4691, 4694, 4694, 4694, 4702, 4702, 4702, 4703, 4714, 4714, 4714, 4721, 4723, 4729, 4733, 4742, 4742, 4742, 4751, 4754, 4754, 4754, 4759, 4762, 4762, 4762, 4766, 4766, 4766, 4778, 4778, 4778, 4783, 4786, 4786, 4786, 4787, 4789, 4793, 4798, 4798, 4798, 4799, 4801, 4813, 4817, 4822, 4822, 4822, 4831, 4834, 4834, 4834, 4846, 4846, 4846, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, 7417, 7433]}
|
| 5 |
+
RLMATH_EOF
|
tasks/construct-ae-p38-factorial-factors-l6-s4/tests/check.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Factor N! into N factors, each >= t (AlphaEvolve problem 38 / OEIS A034258). Exact big-integer check."""
|
| 2 |
+
import math
|
| 3 |
+
|
| 4 |
+
from run import Invalid, int_list
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
def check(inst, ans):
|
| 8 |
+
n, t = inst["N"], inst["t"]
|
| 9 |
+
f = int_list(ans.get("factors"), n, t, None, "factors")
|
| 10 |
+
if math.prod(f) != math.factorial(n):
|
| 11 |
+
raise Invalid(f"the product of the factors is not {n}!")
|
| 12 |
+
return None, {"min_factor": min(f)}
|
tasks/construct-ae-p38-factorial-factors-l6-s4/tests/instance.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"N": 7446, "t": 2426, "family": "ae_p38_factorial_factors", "subset": "construct"}
|
tasks/construct-ae-p38-factorial-factors-l6-s4/tests/run.py
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""rlmath runtime grader. Copied into every task as /tests/run.py next to /tests/check.py.
|
| 2 |
+
|
| 3 |
+
Deterministic; no LLM in the reward path. Runs with python3 + numpy/scipy/sympy/networkx only.
|
| 4 |
+
|
| 5 |
+
python3 /tests/run.py /tests/instance.json /workdir/answer.json
|
| 6 |
+
|
| 7 |
+
Prints the reward in [0, 1] and writes /logs/verifier/details.json when that directory exists.
|
| 8 |
+
|
| 9 |
+
check.py must define check(inst, ans) -> (value, extra_dict) and raise Invalid for a bad answer.
|
| 10 |
+
construct : value is ignored; a returned check means the witness is valid -> reward 1.0
|
| 11 |
+
optimize : value is the raw objective; reward = 0.1 + 0.9 * progress, where
|
| 12 |
+
progress = clip((s - baseline) / (best_known - baseline), 0, 1) (maximize)
|
| 13 |
+
clip((baseline - s) / (baseline - best_known), 0, 1) (minimize)
|
| 14 |
+
inst must carry "direction", "baseline", "best_known".
|
| 15 |
+
"""
|
| 16 |
+
import json
|
| 17 |
+
import math
|
| 18 |
+
import os
|
| 19 |
+
import sys
|
| 20 |
+
|
| 21 |
+
VALID_FLOOR = 0.1
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
class Invalid(Exception):
|
| 25 |
+
pass
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
# ------------------------------------------------------------ input helpers
|
| 29 |
+
|
| 30 |
+
def int_list(v, n=None, lo=None, hi=None, name="list"):
|
| 31 |
+
if not isinstance(v, list):
|
| 32 |
+
raise Invalid(f"{name} must be a list")
|
| 33 |
+
if n is not None and len(v) != n:
|
| 34 |
+
raise Invalid(f"{name} must have length {n}, got {len(v)}")
|
| 35 |
+
for x in v:
|
| 36 |
+
if isinstance(x, bool) or not isinstance(x, int):
|
| 37 |
+
raise Invalid(f"{name} must contain integers only")
|
| 38 |
+
if (lo is not None and x < lo) or (hi is not None and x > hi):
|
| 39 |
+
raise Invalid(f"{name} entry {x} out of range [{lo}, {hi}]")
|
| 40 |
+
return v
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
def as_int(x, name="value", lo=None, hi=None):
|
| 44 |
+
return int_list([x], 1, lo, hi, name)[0]
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
def num(x, name="value"):
|
| 48 |
+
if isinstance(x, bool) or not isinstance(x, (int, float)):
|
| 49 |
+
raise Invalid(f"{name} must be a number")
|
| 50 |
+
if not math.isfinite(x):
|
| 51 |
+
raise Invalid(f"{name} is not finite")
|
| 52 |
+
return float(x)
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
def float_matrix(v, rows=None, cols=None, name="matrix"):
|
| 56 |
+
if not isinstance(v, list) or (rows is not None and len(v) != rows):
|
| 57 |
+
raise Invalid(f"{name} must be a list of {rows} rows")
|
| 58 |
+
out = []
|
| 59 |
+
for r in v:
|
| 60 |
+
if not isinstance(r, list) or (cols is not None and len(r) != cols):
|
| 61 |
+
raise Invalid(f"each row of {name} must have {cols} numbers")
|
| 62 |
+
out.append([num(x, name) for x in r])
|
| 63 |
+
return out
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
def float_list(v, n=None, name="list"):
|
| 67 |
+
if not isinstance(v, list) or (n is not None and len(v) != n):
|
| 68 |
+
raise Invalid(f"{name} must be a list of length {n}")
|
| 69 |
+
return [num(x, name) for x in v]
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
# ------------------------------------------------------------------ reward
|
| 73 |
+
|
| 74 |
+
def optimize_reward(inst, s):
|
| 75 |
+
b, best = inst["baseline"], inst["best_known"]
|
| 76 |
+
if inst.get("progress_scale") == "log":
|
| 77 |
+
# for non-negative losses spanning orders of magnitude (e.g. overlap loss -> 0);
|
| 78 |
+
# progress is measured in log10(value + floor)
|
| 79 |
+
f = inst.get("log_floor", 1e-3)
|
| 80 |
+
b, best, s = (math.log10(max(x, 0.0) + f) for x in (b, best, s))
|
| 81 |
+
if inst["direction"] == "maximize":
|
| 82 |
+
p = (s - b) / (best - b)
|
| 83 |
+
else:
|
| 84 |
+
p = (b - s) / (b - best)
|
| 85 |
+
return VALID_FLOOR + (1 - VALID_FLOOR) * max(0.0, min(1.0, p))
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
def grade(inst, ans, check):
|
| 89 |
+
try:
|
| 90 |
+
if not isinstance(ans, dict):
|
| 91 |
+
raise Invalid("answer must be a JSON object")
|
| 92 |
+
value, extra = check(inst, ans)
|
| 93 |
+
if inst.get("subset") == "optimize":
|
| 94 |
+
s = float(value)
|
| 95 |
+
if not math.isfinite(s):
|
| 96 |
+
raise Invalid("non-finite score")
|
| 97 |
+
return optimize_reward(inst, s), {"valid": True, "raw_score": s, **(extra or {})}
|
| 98 |
+
return 1.0, {"valid": True, **(extra or {})}
|
| 99 |
+
except Invalid as e:
|
| 100 |
+
return 0.0, {"valid": False, "error": str(e)}
|
| 101 |
+
except Exception as e: # any malformed answer
|
| 102 |
+
return 0.0, {"valid": False, "error": f"{type(e).__name__}: {e}"}
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
def main():
|
| 106 |
+
here = os.path.dirname(os.path.abspath(__file__))
|
| 107 |
+
sys.path.insert(0, here)
|
| 108 |
+
# import ourselves as `run` so check.py's `from run import Invalid` is the same class
|
| 109 |
+
import run as R # noqa: E402
|
| 110 |
+
import check as family # noqa: E402
|
| 111 |
+
|
| 112 |
+
inst = json.load(open(sys.argv[1]))
|
| 113 |
+
try:
|
| 114 |
+
ans = json.load(open(sys.argv[2]))
|
| 115 |
+
except Exception as e:
|
| 116 |
+
reward, det = 0.0, {"valid": False, "error": f"unreadable answer: {e}"}
|
| 117 |
+
else:
|
| 118 |
+
reward, det = R.grade(inst, ans, family.check)
|
| 119 |
+
det["reward"] = reward
|
| 120 |
+
if os.path.isdir("/logs/verifier"):
|
| 121 |
+
with open("/logs/verifier/details.json", "w") as f:
|
| 122 |
+
json.dump(det, f)
|
| 123 |
+
print(reward)
|
| 124 |
+
|
| 125 |
+
|
| 126 |
+
if __name__ == "__main__":
|
| 127 |
+
main()
|
tasks/construct-ae-p38-factorial-factors-l6-s4/tests/test.sh
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
mkdir -p /logs/verifier
|
| 3 |
+
if [ ! -s /workdir/answer.json ]; then
|
| 4 |
+
echo '{"valid": false, "error": "no /workdir/answer.json"}' > /logs/verifier/details.json
|
| 5 |
+
echo 0 > /logs/verifier/reward.txt
|
| 6 |
+
exit 0
|
| 7 |
+
fi
|
| 8 |
+
timeout 290 python3 /tests/run.py /tests/instance.json /workdir/answer.json \
|
| 9 |
+
> /logs/verifier/reward.txt 2> /logs/verifier/grader.log || echo 0 > /logs/verifier/reward.txt
|
tasks/construct-ae-p52-erdos-squarefree-l2-s0/environment/Dockerfile
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11.16-slim
|
| 2 |
+
RUN apt-get update && apt-get install -y --no-install-recommends tmux curl git procps build-essential \
|
| 3 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 4 |
+
RUN pip install --no-cache-dir numpy==2.4.6 scipy==1.17.1 sympy==1.14.0 networkx==3.6.1 \
|
| 5 |
+
python-sat==1.9.dev15 z3-solver==5.1.0.0 PuLP==3.3.2 ortools==9.15.6755
|
| 6 |
+
WORKDIR /workdir
|
| 7 |
+
COPY instance.json /workdir/instance.json
|
tasks/construct-ae-p52-erdos-squarefree-l2-s0/environment/instance.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"N": 101, "t": 4, "family": "ae_p52_erdos_squarefree", "subset": "construct"}
|
tasks/construct-ae-p52-erdos-squarefree-l2-s0/solution/solve.sh
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
# oracle: a known valid construction (planted witness or published solution)
|
| 3 |
+
cat > /workdir/answer.json <<'RLMATH_EOF'
|
| 4 |
+
{"A": [7, 32, 57, 82]}
|
| 5 |
+
RLMATH_EOF
|
tasks/construct-ae-p52-erdos-squarefree-l2-s0/tests/check.py
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Erdos squarefree problem (AlphaEvolve problem 52): A in [1, N], |A| >= t, ab+1 NOT squarefree for all a, b in A
|
| 2 |
+
(a = b included). The repo's problem page says "square-free"; the notebook and the Erdos problem ask for
|
| 3 |
+
"never squarefree", which is what we check. Exact: for every pair we find a prime p with p^2 | ab+1."""
|
| 4 |
+
import numpy as np
|
| 5 |
+
|
| 6 |
+
from run import Invalid, int_list
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def _primes(n):
|
| 10 |
+
s = np.ones(n + 1, dtype=bool)
|
| 11 |
+
s[:2] = False
|
| 12 |
+
for i in range(2, int(n ** .5) + 1):
|
| 13 |
+
if s[i]:
|
| 14 |
+
s[i * i::i] = False
|
| 15 |
+
return np.nonzero(s)[0]
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
def check(inst, ans):
|
| 19 |
+
n, t = inst["N"], inst["t"]
|
| 20 |
+
a = ans.get("A")
|
| 21 |
+
if not isinstance(a, list) or not (t <= len(a) <= 2 * t + 20):
|
| 22 |
+
raise Invalid(f"A must be a list of {t}..{2 * t + 20} integers")
|
| 23 |
+
int_list(a, None, 1, n, "A")
|
| 24 |
+
if len(set(a)) != len(a):
|
| 25 |
+
raise Invalid("A must consist of distinct integers")
|
| 26 |
+
x = np.array(sorted(a), dtype=np.int64)
|
| 27 |
+
iu, ju = np.triu_indices(len(x))
|
| 28 |
+
va, vb = x[iu], x[ju]
|
| 29 |
+
left = np.ones(len(iu), dtype=bool) # pairs without a square divisor found yet
|
| 30 |
+
for p in _primes(int((n * n + 1) ** .5) + 1):
|
| 31 |
+
q = int(p) * int(p)
|
| 32 |
+
idx = np.nonzero(left)[0]
|
| 33 |
+
hit = ((va[idx] % q) * (vb[idx] % q) + 1) % q == 0
|
| 34 |
+
left[idx[hit]] = False
|
| 35 |
+
if not left.any():
|
| 36 |
+
return None, {"size": len(a)}
|
| 37 |
+
k = int(np.nonzero(left)[0][0])
|
| 38 |
+
raise Invalid(f"{int(va[k])}*{int(vb[k])}+1 = {int(va[k]) * int(vb[k]) + 1} is squarefree")
|
tasks/construct-ae-p52-erdos-squarefree-l2-s0/tests/instance.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"N": 101, "t": 4, "family": "ae_p52_erdos_squarefree", "subset": "construct"}
|
tasks/construct-ae-p52-erdos-squarefree-l2-s0/tests/run.py
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""rlmath runtime grader. Copied into every task as /tests/run.py next to /tests/check.py.
|
| 2 |
+
|
| 3 |
+
Deterministic; no LLM in the reward path. Runs with python3 + numpy/scipy/sympy/networkx only.
|
| 4 |
+
|
| 5 |
+
python3 /tests/run.py /tests/instance.json /workdir/answer.json
|
| 6 |
+
|
| 7 |
+
Prints the reward in [0, 1] and writes /logs/verifier/details.json when that directory exists.
|
| 8 |
+
|
| 9 |
+
check.py must define check(inst, ans) -> (value, extra_dict) and raise Invalid for a bad answer.
|
| 10 |
+
construct : value is ignored; a returned check means the witness is valid -> reward 1.0
|
| 11 |
+
optimize : value is the raw objective; reward = 0.1 + 0.9 * progress, where
|
| 12 |
+
progress = clip((s - baseline) / (best_known - baseline), 0, 1) (maximize)
|
| 13 |
+
clip((baseline - s) / (baseline - best_known), 0, 1) (minimize)
|
| 14 |
+
inst must carry "direction", "baseline", "best_known".
|
| 15 |
+
"""
|
| 16 |
+
import json
|
| 17 |
+
import math
|
| 18 |
+
import os
|
| 19 |
+
import sys
|
| 20 |
+
|
| 21 |
+
VALID_FLOOR = 0.1
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
class Invalid(Exception):
|
| 25 |
+
pass
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
# ------------------------------------------------------------ input helpers
|
| 29 |
+
|
| 30 |
+
def int_list(v, n=None, lo=None, hi=None, name="list"):
|
| 31 |
+
if not isinstance(v, list):
|
| 32 |
+
raise Invalid(f"{name} must be a list")
|
| 33 |
+
if n is not None and len(v) != n:
|
| 34 |
+
raise Invalid(f"{name} must have length {n}, got {len(v)}")
|
| 35 |
+
for x in v:
|
| 36 |
+
if isinstance(x, bool) or not isinstance(x, int):
|
| 37 |
+
raise Invalid(f"{name} must contain integers only")
|
| 38 |
+
if (lo is not None and x < lo) or (hi is not None and x > hi):
|
| 39 |
+
raise Invalid(f"{name} entry {x} out of range [{lo}, {hi}]")
|
| 40 |
+
return v
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
def as_int(x, name="value", lo=None, hi=None):
|
| 44 |
+
return int_list([x], 1, lo, hi, name)[0]
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
def num(x, name="value"):
|
| 48 |
+
if isinstance(x, bool) or not isinstance(x, (int, float)):
|
| 49 |
+
raise Invalid(f"{name} must be a number")
|
| 50 |
+
if not math.isfinite(x):
|
| 51 |
+
raise Invalid(f"{name} is not finite")
|
| 52 |
+
return float(x)
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
def float_matrix(v, rows=None, cols=None, name="matrix"):
|
| 56 |
+
if not isinstance(v, list) or (rows is not None and len(v) != rows):
|
| 57 |
+
raise Invalid(f"{name} must be a list of {rows} rows")
|
| 58 |
+
out = []
|
| 59 |
+
for r in v:
|
| 60 |
+
if not isinstance(r, list) or (cols is not None and len(r) != cols):
|
| 61 |
+
raise Invalid(f"each row of {name} must have {cols} numbers")
|
| 62 |
+
out.append([num(x, name) for x in r])
|
| 63 |
+
return out
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
def float_list(v, n=None, name="list"):
|
| 67 |
+
if not isinstance(v, list) or (n is not None and len(v) != n):
|
| 68 |
+
raise Invalid(f"{name} must be a list of length {n}")
|
| 69 |
+
return [num(x, name) for x in v]
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
# ------------------------------------------------------------------ reward
|
| 73 |
+
|
| 74 |
+
def optimize_reward(inst, s):
|
| 75 |
+
b, best = inst["baseline"], inst["best_known"]
|
| 76 |
+
if inst.get("progress_scale") == "log":
|
| 77 |
+
# for non-negative losses spanning orders of magnitude (e.g. overlap loss -> 0);
|
| 78 |
+
# progress is measured in log10(value + floor)
|
| 79 |
+
f = inst.get("log_floor", 1e-3)
|
| 80 |
+
b, best, s = (math.log10(max(x, 0.0) + f) for x in (b, best, s))
|
| 81 |
+
if inst["direction"] == "maximize":
|
| 82 |
+
p = (s - b) / (best - b)
|
| 83 |
+
else:
|
| 84 |
+
p = (b - s) / (b - best)
|
| 85 |
+
return VALID_FLOOR + (1 - VALID_FLOOR) * max(0.0, min(1.0, p))
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
def grade(inst, ans, check):
|
| 89 |
+
try:
|
| 90 |
+
if not isinstance(ans, dict):
|
| 91 |
+
raise Invalid("answer must be a JSON object")
|
| 92 |
+
value, extra = check(inst, ans)
|
| 93 |
+
if inst.get("subset") == "optimize":
|
| 94 |
+
s = float(value)
|
| 95 |
+
if not math.isfinite(s):
|
| 96 |
+
raise Invalid("non-finite score")
|
| 97 |
+
return optimize_reward(inst, s), {"valid": True, "raw_score": s, **(extra or {})}
|
| 98 |
+
return 1.0, {"valid": True, **(extra or {})}
|
| 99 |
+
except Invalid as e:
|
| 100 |
+
return 0.0, {"valid": False, "error": str(e)}
|
| 101 |
+
except Exception as e: # any malformed answer
|
| 102 |
+
return 0.0, {"valid": False, "error": f"{type(e).__name__}: {e}"}
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
def main():
|
| 106 |
+
here = os.path.dirname(os.path.abspath(__file__))
|
| 107 |
+
sys.path.insert(0, here)
|
| 108 |
+
# import ourselves as `run` so check.py's `from run import Invalid` is the same class
|
| 109 |
+
import run as R # noqa: E402
|
| 110 |
+
import check as family # noqa: E402
|
| 111 |
+
|
| 112 |
+
inst = json.load(open(sys.argv[1]))
|
| 113 |
+
try:
|
| 114 |
+
ans = json.load(open(sys.argv[2]))
|
| 115 |
+
except Exception as e:
|
| 116 |
+
reward, det = 0.0, {"valid": False, "error": f"unreadable answer: {e}"}
|
| 117 |
+
else:
|
| 118 |
+
reward, det = R.grade(inst, ans, family.check)
|
| 119 |
+
det["reward"] = reward
|
| 120 |
+
if os.path.isdir("/logs/verifier"):
|
| 121 |
+
with open("/logs/verifier/details.json", "w") as f:
|
| 122 |
+
json.dump(det, f)
|
| 123 |
+
print(reward)
|
| 124 |
+
|
| 125 |
+
|
| 126 |
+
if __name__ == "__main__":
|
| 127 |
+
main()
|
tasks/construct-ae-p52-erdos-squarefree-l2-s0/tests/test.sh
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
mkdir -p /logs/verifier
|
| 3 |
+
if [ ! -s /workdir/answer.json ]; then
|
| 4 |
+
echo '{"valid": false, "error": "no /workdir/answer.json"}' > /logs/verifier/details.json
|
| 5 |
+
echo 0 > /logs/verifier/reward.txt
|
| 6 |
+
exit 0
|
| 7 |
+
fi
|
| 8 |
+
timeout 290 python3 /tests/run.py /tests/instance.json /workdir/answer.json \
|
| 9 |
+
> /logs/verifier/reward.txt 2> /logs/verifier/grader.log || echo 0 > /logs/verifier/reward.txt
|
tasks/construct-ae-p52-erdos-squarefree-l2-s7/environment/Dockerfile
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11.16-slim
|
| 2 |
+
RUN apt-get update && apt-get install -y --no-install-recommends tmux curl git procps build-essential \
|
| 3 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 4 |
+
RUN pip install --no-cache-dir numpy==2.4.6 scipy==1.17.1 sympy==1.14.0 networkx==3.6.1 \
|
| 5 |
+
python-sat==1.9.dev15 z3-solver==5.1.0.0 PuLP==3.3.2 ortools==9.15.6755
|
| 6 |
+
WORKDIR /workdir
|
| 7 |
+
COPY instance.json /workdir/instance.json
|
tasks/construct-ae-p52-erdos-squarefree-l2-s7/environment/instance.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"N": 102, "t": 4, "family": "ae_p52_erdos_squarefree", "subset": "construct"}
|
tasks/construct-ae-p52-erdos-squarefree-l2-s7/solution/solve.sh
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
# oracle: a known valid construction (planted witness or published solution)
|
| 3 |
+
cat > /workdir/answer.json <<'RLMATH_EOF'
|
| 4 |
+
{"A": [7, 32, 57, 82]}
|
| 5 |
+
RLMATH_EOF
|
tasks/construct-ae-p52-erdos-squarefree-l2-s7/tests/check.py
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Erdos squarefree problem (AlphaEvolve problem 52): A in [1, N], |A| >= t, ab+1 NOT squarefree for all a, b in A
|
| 2 |
+
(a = b included). The repo's problem page says "square-free"; the notebook and the Erdos problem ask for
|
| 3 |
+
"never squarefree", which is what we check. Exact: for every pair we find a prime p with p^2 | ab+1."""
|
| 4 |
+
import numpy as np
|
| 5 |
+
|
| 6 |
+
from run import Invalid, int_list
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def _primes(n):
|
| 10 |
+
s = np.ones(n + 1, dtype=bool)
|
| 11 |
+
s[:2] = False
|
| 12 |
+
for i in range(2, int(n ** .5) + 1):
|
| 13 |
+
if s[i]:
|
| 14 |
+
s[i * i::i] = False
|
| 15 |
+
return np.nonzero(s)[0]
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
def check(inst, ans):
|
| 19 |
+
n, t = inst["N"], inst["t"]
|
| 20 |
+
a = ans.get("A")
|
| 21 |
+
if not isinstance(a, list) or not (t <= len(a) <= 2 * t + 20):
|
| 22 |
+
raise Invalid(f"A must be a list of {t}..{2 * t + 20} integers")
|
| 23 |
+
int_list(a, None, 1, n, "A")
|
| 24 |
+
if len(set(a)) != len(a):
|
| 25 |
+
raise Invalid("A must consist of distinct integers")
|
| 26 |
+
x = np.array(sorted(a), dtype=np.int64)
|
| 27 |
+
iu, ju = np.triu_indices(len(x))
|
| 28 |
+
va, vb = x[iu], x[ju]
|
| 29 |
+
left = np.ones(len(iu), dtype=bool) # pairs without a square divisor found yet
|
| 30 |
+
for p in _primes(int((n * n + 1) ** .5) + 1):
|
| 31 |
+
q = int(p) * int(p)
|
| 32 |
+
idx = np.nonzero(left)[0]
|
| 33 |
+
hit = ((va[idx] % q) * (vb[idx] % q) + 1) % q == 0
|
| 34 |
+
left[idx[hit]] = False
|
| 35 |
+
if not left.any():
|
| 36 |
+
return None, {"size": len(a)}
|
| 37 |
+
k = int(np.nonzero(left)[0][0])
|
| 38 |
+
raise Invalid(f"{int(va[k])}*{int(vb[k])}+1 = {int(va[k]) * int(vb[k]) + 1} is squarefree")
|
tasks/construct-ae-p52-erdos-squarefree-l2-s7/tests/instance.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"N": 102, "t": 4, "family": "ae_p52_erdos_squarefree", "subset": "construct"}
|
tasks/construct-ae-p52-erdos-squarefree-l2-s7/tests/run.py
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""rlmath runtime grader. Copied into every task as /tests/run.py next to /tests/check.py.
|
| 2 |
+
|
| 3 |
+
Deterministic; no LLM in the reward path. Runs with python3 + numpy/scipy/sympy/networkx only.
|
| 4 |
+
|
| 5 |
+
python3 /tests/run.py /tests/instance.json /workdir/answer.json
|
| 6 |
+
|
| 7 |
+
Prints the reward in [0, 1] and writes /logs/verifier/details.json when that directory exists.
|
| 8 |
+
|
| 9 |
+
check.py must define check(inst, ans) -> (value, extra_dict) and raise Invalid for a bad answer.
|
| 10 |
+
construct : value is ignored; a returned check means the witness is valid -> reward 1.0
|
| 11 |
+
optimize : value is the raw objective; reward = 0.1 + 0.9 * progress, where
|
| 12 |
+
progress = clip((s - baseline) / (best_known - baseline), 0, 1) (maximize)
|
| 13 |
+
clip((baseline - s) / (baseline - best_known), 0, 1) (minimize)
|
| 14 |
+
inst must carry "direction", "baseline", "best_known".
|
| 15 |
+
"""
|
| 16 |
+
import json
|
| 17 |
+
import math
|
| 18 |
+
import os
|
| 19 |
+
import sys
|
| 20 |
+
|
| 21 |
+
VALID_FLOOR = 0.1
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
class Invalid(Exception):
|
| 25 |
+
pass
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
# ------------------------------------------------------------ input helpers
|
| 29 |
+
|
| 30 |
+
def int_list(v, n=None, lo=None, hi=None, name="list"):
|
| 31 |
+
if not isinstance(v, list):
|
| 32 |
+
raise Invalid(f"{name} must be a list")
|
| 33 |
+
if n is not None and len(v) != n:
|
| 34 |
+
raise Invalid(f"{name} must have length {n}, got {len(v)}")
|
| 35 |
+
for x in v:
|
| 36 |
+
if isinstance(x, bool) or not isinstance(x, int):
|
| 37 |
+
raise Invalid(f"{name} must contain integers only")
|
| 38 |
+
if (lo is not None and x < lo) or (hi is not None and x > hi):
|
| 39 |
+
raise Invalid(f"{name} entry {x} out of range [{lo}, {hi}]")
|
| 40 |
+
return v
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
def as_int(x, name="value", lo=None, hi=None):
|
| 44 |
+
return int_list([x], 1, lo, hi, name)[0]
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
def num(x, name="value"):
|
| 48 |
+
if isinstance(x, bool) or not isinstance(x, (int, float)):
|
| 49 |
+
raise Invalid(f"{name} must be a number")
|
| 50 |
+
if not math.isfinite(x):
|
| 51 |
+
raise Invalid(f"{name} is not finite")
|
| 52 |
+
return float(x)
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
def float_matrix(v, rows=None, cols=None, name="matrix"):
|
| 56 |
+
if not isinstance(v, list) or (rows is not None and len(v) != rows):
|
| 57 |
+
raise Invalid(f"{name} must be a list of {rows} rows")
|
| 58 |
+
out = []
|
| 59 |
+
for r in v:
|
| 60 |
+
if not isinstance(r, list) or (cols is not None and len(r) != cols):
|
| 61 |
+
raise Invalid(f"each row of {name} must have {cols} numbers")
|
| 62 |
+
out.append([num(x, name) for x in r])
|
| 63 |
+
return out
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
def float_list(v, n=None, name="list"):
|
| 67 |
+
if not isinstance(v, list) or (n is not None and len(v) != n):
|
| 68 |
+
raise Invalid(f"{name} must be a list of length {n}")
|
| 69 |
+
return [num(x, name) for x in v]
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
# ------------------------------------------------------------------ reward
|
| 73 |
+
|
| 74 |
+
def optimize_reward(inst, s):
|
| 75 |
+
b, best = inst["baseline"], inst["best_known"]
|
| 76 |
+
if inst.get("progress_scale") == "log":
|
| 77 |
+
# for non-negative losses spanning orders of magnitude (e.g. overlap loss -> 0);
|
| 78 |
+
# progress is measured in log10(value + floor)
|
| 79 |
+
f = inst.get("log_floor", 1e-3)
|
| 80 |
+
b, best, s = (math.log10(max(x, 0.0) + f) for x in (b, best, s))
|
| 81 |
+
if inst["direction"] == "maximize":
|
| 82 |
+
p = (s - b) / (best - b)
|
| 83 |
+
else:
|
| 84 |
+
p = (b - s) / (b - best)
|
| 85 |
+
return VALID_FLOOR + (1 - VALID_FLOOR) * max(0.0, min(1.0, p))
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
def grade(inst, ans, check):
|
| 89 |
+
try:
|
| 90 |
+
if not isinstance(ans, dict):
|
| 91 |
+
raise Invalid("answer must be a JSON object")
|
| 92 |
+
value, extra = check(inst, ans)
|
| 93 |
+
if inst.get("subset") == "optimize":
|
| 94 |
+
s = float(value)
|
| 95 |
+
if not math.isfinite(s):
|
| 96 |
+
raise Invalid("non-finite score")
|
| 97 |
+
return optimize_reward(inst, s), {"valid": True, "raw_score": s, **(extra or {})}
|
| 98 |
+
return 1.0, {"valid": True, **(extra or {})}
|
| 99 |
+
except Invalid as e:
|
| 100 |
+
return 0.0, {"valid": False, "error": str(e)}
|
| 101 |
+
except Exception as e: # any malformed answer
|
| 102 |
+
return 0.0, {"valid": False, "error": f"{type(e).__name__}: {e}"}
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
def main():
|
| 106 |
+
here = os.path.dirname(os.path.abspath(__file__))
|
| 107 |
+
sys.path.insert(0, here)
|
| 108 |
+
# import ourselves as `run` so check.py's `from run import Invalid` is the same class
|
| 109 |
+
import run as R # noqa: E402
|
| 110 |
+
import check as family # noqa: E402
|
| 111 |
+
|
| 112 |
+
inst = json.load(open(sys.argv[1]))
|
| 113 |
+
try:
|
| 114 |
+
ans = json.load(open(sys.argv[2]))
|
| 115 |
+
except Exception as e:
|
| 116 |
+
reward, det = 0.0, {"valid": False, "error": f"unreadable answer: {e}"}
|
| 117 |
+
else:
|
| 118 |
+
reward, det = R.grade(inst, ans, family.check)
|
| 119 |
+
det["reward"] = reward
|
| 120 |
+
if os.path.isdir("/logs/verifier"):
|
| 121 |
+
with open("/logs/verifier/details.json", "w") as f:
|
| 122 |
+
json.dump(det, f)
|
| 123 |
+
print(reward)
|
| 124 |
+
|
| 125 |
+
|
| 126 |
+
if __name__ == "__main__":
|
| 127 |
+
main()
|
tasks/construct-ae-p52-erdos-squarefree-l2-s7/tests/test.sh
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
mkdir -p /logs/verifier
|
| 3 |
+
if [ ! -s /workdir/answer.json ]; then
|
| 4 |
+
echo '{"valid": false, "error": "no /workdir/answer.json"}' > /logs/verifier/details.json
|
| 5 |
+
echo 0 > /logs/verifier/reward.txt
|
| 6 |
+
exit 0
|
| 7 |
+
fi
|
| 8 |
+
timeout 290 python3 /tests/run.py /tests/instance.json /workdir/answer.json \
|
| 9 |
+
> /logs/verifier/reward.txt 2> /logs/verifier/grader.log || echo 0 > /logs/verifier/reward.txt
|
tasks/construct-ae-p65-imo2025-p6-tiling-l5-s0/environment/Dockerfile
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11.16-slim
|
| 2 |
+
RUN apt-get update && apt-get install -y --no-install-recommends tmux curl git procps build-essential \
|
| 3 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 4 |
+
RUN pip install --no-cache-dir numpy==2.4.6 scipy==1.17.1 sympy==1.14.0 networkx==3.6.1 \
|
| 5 |
+
python-sat==1.9.dev15 z3-solver==5.1.0.0 PuLP==3.3.2 ortools==9.15.6755
|
| 6 |
+
WORKDIR /workdir
|
| 7 |
+
COPY instance.json /workdir/instance.json
|
tasks/construct-ae-p65-imo2025-p6-tiling-l5-s0/environment/instance.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"n": 900, "max_tiles": 957, "family": "ae_p65_imo2025_p6_tiling", "subset": "construct"}
|
tasks/construct-ae-p65-imo2025-p6-tiling-l5-s0/solution/solve.sh
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
# oracle: a known valid construction (planted witness or published solution)
|
| 3 |
+
cat > /workdir/answer.json <<'RLMATH_EOF'
|
| 4 |
+
{"tiles": [[0, 0, 30, 29], [0, 30, 1, 870], [1, 29, 30, 30], [1, 60, 1, 840], [2, 59, 30, 30], [2, 90, 1, 810], [3, 89, 30, 30], [3, 120, 1, 780], [4, 119, 30, 30], [4, 150, 1, 750], [5, 149, 30, 30], [5, 180, 1, 720], [6, 179, 30, 30], [6, 210, 1, 690], [7, 209, 30, 30], [7, 240, 1, 660], [8, 239, 30, 30], [8, 270, 1, 630], [9, 269, 30, 30], [9, 300, 1, 600], [10, 299, 30, 30], [10, 330, 1, 570], [11, 329, 30, 30], [11, 360, 1, 540], [12, 359, 30, 30], [12, 390, 1, 510], [13, 389, 30, 30], [13, 420, 1, 480], [14, 419, 30, 30], [14, 450, 1, 450], [15, 449, 30, 30], [15, 480, 1, 420], [16, 479, 30, 30], [16, 510, 1, 390], [17, 509, 30, 30], [17, 540, 1, 360], [18, 539, 30, 30], [18, 570, 1, 330], [19, 569, 30, 30], [19, 600, 1, 300], [20, 599, 30, 30], [20, 630, 1, 270], [21, 629, 30, 30], [21, 660, 1, 240], [22, 659, 30, 30], [22, 690, 1, 210], [23, 689, 30, 30], [23, 720, 1, 180], [24, 719, 30, 30], [24, 750, 1, 150], [25, 749, 30, 30], [25, 780, 1, 120], [26, 779, 30, 30], [26, 810, 1, 90], [27, 809, 30, 30], [27, 840, 1, 60], [28, 839, 30, 30], [28, 870, 1, 30], [29, 869, 30, 30], [30, 0, 30, 28], [30, 899, 870, 1], [31, 28, 30, 30], [32, 58, 30, 30], [33, 88, 30, 30], [34, 118, 30, 30], [35, 148, 30, 30], [36, 178, 30, 30], [37, 208, 30, 30], [38, 238, 30, 30], [39, 268, 30, 30], [40, 298, 30, 30], [41, 328, 30, 30], [42, 358, 30, 30], [43, 388, 30, 30], [44, 418, 30, 30], [45, 448, 30, 30], [46, 478, 30, 30], [47, 508, 30, 30], [48, 538, 30, 30], [49, 568, 30, 30], [50, 598, 30, 30], [51, 628, 30, 30], [52, 658, 30, 30], [53, 688, 30, 30], [54, 718, 30, 30], [55, 748, 30, 30], [56, 778, 30, 30], [57, 808, 30, 30], [58, 838, 30, 30], [59, 868, 30, 30], [60, 0, 30, 27], [60, 898, 840, 1], [61, 27, 30, 30], [62, 57, 30, 30], [63, 87, 30, 30], [64, 117, 30, 30], [65, 147, 30, 30], [66, 177, 30, 30], [67, 207, 30, 30], [68, 237, 30, 30], [69, 267, 30, 30], [70, 297, 30, 30], [71, 327, 30, 30], [72, 357, 30, 30], [73, 387, 30, 30], [74, 417, 30, 30], [75, 447, 30, 30], [76, 477, 30, 30], [77, 507, 30, 30], [78, 537, 30, 30], [79, 567, 30, 30], [80, 597, 30, 30], [81, 627, 30, 30], [82, 657, 30, 30], [83, 687, 30, 30], [84, 717, 30, 30], [85, 747, 30, 30], [86, 777, 30, 30], [87, 807, 30, 30], [88, 837, 30, 30], [89, 867, 30, 30], [90, 0, 30, 26], [90, 897, 810, 1], [91, 26, 30, 30], [92, 56, 30, 30], [93, 86, 30, 30], [94, 116, 30, 30], [95, 146, 30, 30], [96, 176, 30, 30], [97, 206, 30, 30], [98, 236, 30, 30], [99, 266, 30, 30], [100, 296, 30, 30], [101, 326, 30, 30], [102, 356, 30, 30], [103, 386, 30, 30], [104, 416, 30, 30], [105, 446, 30, 30], [106, 476, 30, 30], [107, 506, 30, 30], [108, 536, 30, 30], [109, 566, 30, 30], [110, 596, 30, 30], [111, 626, 30, 30], [112, 656, 30, 30], [113, 686, 30, 30], [114, 716, 30, 30], [115, 746, 30, 30], [116, 776, 30, 30], [117, 806, 30, 30], [118, 836, 30, 30], [119, 866, 30, 30], [120, 0, 30, 25], [120, 896, 780, 1], [121, 25, 30, 30], [122, 55, 30, 30], [123, 85, 30, 30], [124, 115, 30, 30], [125, 145, 30, 30], [126, 175, 30, 30], [127, 205, 30, 30], [128, 235, 30, 30], [129, 265, 30, 30], [130, 295, 30, 30], [131, 325, 30, 30], [132, 355, 30, 30], [133, 385, 30, 30], [134, 415, 30, 30], [135, 445, 30, 30], [136, 475, 30, 30], [137, 505, 30, 30], [138, 535, 30, 30], [139, 565, 30, 30], [140, 595, 30, 30], [141, 625, 30, 30], [142, 655, 30, 30], [143, 685, 30, 30], [144, 715, 30, 30], [145, 745, 30, 30], [146, 775, 30, 30], [147, 805, 30, 30], [148, 835, 30, 30], [149, 865, 30, 30], [150, 0, 30, 24], [150, 895, 750, 1], [151, 24, 30, 30], [152, 54, 30, 30], [153, 84, 30, 30], [154, 114, 30, 30], [155, 144, 30, 30], [156, 174, 30, 30], [157, 204, 30, 30], [158, 234, 30, 30], [159, 264, 30, 30], [160, 294, 30, 30], [161, 324, 30, 30], [162, 354, 30, 30], [163, 384, 30, 30], [164, 414, 30, 30], [165, 444, 30, 30], [166, 474, 30, 30], [167, 504, 30, 30], [168, 534, 30, 30], [169, 564, 30, 30], [170, 594, 30, 30], [171, 624, 30, 30], [172, 654, 30, 30], [173, 684, 30, 30], [174, 714, 30, 30], [175, 744, 30, 30], [176, 774, 30, 30], [177, 804, 30, 30], [178, 834, 30, 30], [179, 864, 30, 30], [180, 0, 30, 23], [180, 894, 720, 1], [181, 23, 30, 30], [182, 53, 30, 30], [183, 83, 30, 30], [184, 113, 30, 30], [185, 143, 30, 30], [186, 173, 30, 30], [187, 203, 30, 30], [188, 233, 30, 30], [189, 263, 30, 30], [190, 293, 30, 30], [191, 323, 30, 30], [192, 353, 30, 30], [193, 383, 30, 30], [194, 413, 30, 30], [195, 443, 30, 30], [196, 473, 30, 30], [197, 503, 30, 30], [198, 533, 30, 30], [199, 563, 30, 30], [200, 593, 30, 30], [201, 623, 30, 30], [202, 653, 30, 30], [203, 683, 30, 30], [204, 713, 30, 30], [205, 743, 30, 30], [206, 773, 30, 30], [207, 803, 30, 30], [208, 833, 30, 30], [209, 863, 30, 30], [210, 0, 30, 22], [210, 893, 690, 1], [211, 22, 30, 30], [212, 52, 30, 30], [213, 82, 30, 30], [214, 112, 30, 30], [215, 142, 30, 30], [216, 172, 30, 30], [217, 202, 30, 30], [218, 232, 30, 30], [219, 262, 30, 30], [220, 292, 30, 30], [221, 322, 30, 30], [222, 352, 30, 30], [223, 382, 30, 30], [224, 412, 30, 30], [225, 442, 30, 30], [226, 472, 30, 30], [227, 502, 30, 30], [228, 532, 30, 30], [229, 562, 30, 30], [230, 592, 30, 30], [231, 622, 30, 30], [232, 652, 30, 30], [233, 682, 30, 30], [234, 712, 30, 30], [235, 742, 30, 30], [236, 772, 30, 30], [237, 802, 30, 30], [238, 832, 30, 30], [239, 862, 30, 30], [240, 0, 30, 21], [240, 892, 660, 1], [241, 21, 30, 30], [242, 51, 30, 30], [243, 81, 30, 30], [244, 111, 30, 30], [245, 141, 30, 30], [246, 171, 30, 30], [247, 201, 30, 30], [248, 231, 30, 30], [249, 261, 30, 30], [250, 291, 30, 30], [251, 321, 30, 30], [252, 351, 30, 30], [253, 381, 30, 30], [254, 411, 30, 30], [255, 441, 30, 30], [256, 471, 30, 30], [257, 501, 30, 30], [258, 531, 30, 30], [259, 561, 30, 30], [260, 591, 30, 30], [261, 621, 30, 30], [262, 651, 30, 30], [263, 681, 30, 30], [264, 711, 30, 30], [265, 741, 30, 30], [266, 771, 30, 30], [267, 801, 30, 30], [268, 831, 30, 30], [269, 861, 30, 30], [270, 0, 30, 20], [270, 891, 630, 1], [271, 20, 30, 30], [272, 50, 30, 30], [273, 80, 30, 30], [274, 110, 30, 30], [275, 140, 30, 30], [276, 170, 30, 30], [277, 200, 30, 30], [278, 230, 30, 30], [279, 260, 30, 30], [280, 290, 30, 30], [281, 320, 30, 30], [282, 350, 30, 30], [283, 380, 30, 30], [284, 410, 30, 30], [285, 440, 30, 30], [286, 470, 30, 30], [287, 500, 30, 30], [288, 530, 30, 30], [289, 560, 30, 30], [290, 590, 30, 30], [291, 620, 30, 30], [292, 650, 30, 30], [293, 680, 30, 30], [294, 710, 30, 30], [295, 740, 30, 30], [296, 770, 30, 30], [297, 800, 30, 30], [298, 830, 30, 30], [299, 860, 30, 30], [300, 0, 30, 19], [300, 890, 600, 1], [301, 19, 30, 30], [302, 49, 30, 30], [303, 79, 30, 30], [304, 109, 30, 30], [305, 139, 30, 30], [306, 169, 30, 30], [307, 199, 30, 30], [308, 229, 30, 30], [309, 259, 30, 30], [310, 289, 30, 30], [311, 319, 30, 30], [312, 349, 30, 30], [313, 379, 30, 30], [314, 409, 30, 30], [315, 439, 30, 30], [316, 469, 30, 30], [317, 499, 30, 30], [318, 529, 30, 30], [319, 559, 30, 30], [320, 589, 30, 30], [321, 619, 30, 30], [322, 649, 30, 30], [323, 679, 30, 30], [324, 709, 30, 30], [325, 739, 30, 30], [326, 769, 30, 30], [327, 799, 30, 30], [328, 829, 30, 30], [329, 859, 30, 30], [330, 0, 30, 18], [330, 889, 570, 1], [331, 18, 30, 30], [332, 48, 30, 30], [333, 78, 30, 30], [334, 108, 30, 30], [335, 138, 30, 30], [336, 168, 30, 30], [337, 198, 30, 30], [338, 228, 30, 30], [339, 258, 30, 30], [340, 288, 30, 30], [341, 318, 30, 30], [342, 348, 30, 30], [343, 378, 30, 30], [344, 408, 30, 30], [345, 438, 30, 30], [346, 468, 30, 30], [347, 498, 30, 30], [348, 528, 30, 30], [349, 558, 30, 30], [350, 588, 30, 30], [351, 618, 30, 30], [352, 648, 30, 30], [353, 678, 30, 30], [354, 708, 30, 30], [355, 738, 30, 30], [356, 768, 30, 30], [357, 798, 30, 30], [358, 828, 30, 30], [359, 858, 30, 30], [360, 0, 30, 17], [360, 888, 540, 1], [361, 17, 30, 30], [362, 47, 30, 30], [363, 77, 30, 30], [364, 107, 30, 30], [365, 137, 30, 30], [366, 167, 30, 30], [367, 197, 30, 30], [368, 227, 30, 30], [369, 257, 30, 30], [370, 287, 30, 30], [371, 317, 30, 30], [372, 347, 30, 30], [373, 377, 30, 30], [374, 407, 30, 30], [375, 437, 30, 30], [376, 467, 30, 30], [377, 497, 30, 30], [378, 527, 30, 30], [379, 557, 30, 30], [380, 587, 30, 30], [381, 617, 30, 30], [382, 647, 30, 30], [383, 677, 30, 30], [384, 707, 30, 30], [385, 737, 30, 30], [386, 767, 30, 30], [387, 797, 30, 30], [388, 827, 30, 30], [389, 857, 30, 30], [390, 0, 30, 16], [390, 887, 510, 1], [391, 16, 30, 30], [392, 46, 30, 30], [393, 76, 30, 30], [394, 106, 30, 30], [395, 136, 30, 30], [396, 166, 30, 30], [397, 196, 30, 30], [398, 226, 30, 30], [399, 256, 30, 30], [400, 286, 30, 30], [401, 316, 30, 30], [402, 346, 30, 30], [403, 376, 30, 30], [404, 406, 30, 30], [405, 436, 30, 30], [406, 466, 30, 30], [407, 496, 30, 30], [408, 526, 30, 30], [409, 556, 30, 30], [410, 586, 30, 30], [411, 616, 30, 30], [412, 646, 30, 30], [413, 676, 30, 30], [414, 706, 30, 30], [415, 736, 30, 30], [416, 766, 30, 30], [417, 796, 30, 30], [418, 826, 30, 30], [419, 856, 30, 30], [420, 0, 30, 15], [420, 886, 480, 1], [421, 15, 30, 30], [422, 45, 30, 30], [423, 75, 30, 30], [424, 105, 30, 30], [425, 135, 30, 30], [426, 165, 30, 30], [427, 195, 30, 30], [428, 225, 30, 30], [429, 255, 30, 30], [430, 285, 30, 30], [431, 315, 30, 30], [432, 345, 30, 30], [433, 375, 30, 30], [434, 405, 30, 30], [435, 435, 30, 30], [436, 465, 30, 30], [437, 495, 30, 30], [438, 525, 30, 30], [439, 555, 30, 30], [440, 585, 30, 30], [441, 615, 30, 30], [442, 645, 30, 30], [443, 675, 30, 30], [444, 705, 30, 30], [445, 735, 30, 30], [446, 765, 30, 30], [447, 795, 30, 30], [448, 825, 30, 30], [449, 855, 30, 30], [450, 0, 30, 14], [450, 885, 450, 1], [451, 14, 30, 30], [452, 44, 30, 30], [453, 74, 30, 30], [454, 104, 30, 30], [455, 134, 30, 30], [456, 164, 30, 30], [457, 194, 30, 30], [458, 224, 30, 30], [459, 254, 30, 30], [460, 284, 30, 30], [461, 314, 30, 30], [462, 344, 30, 30], [463, 374, 30, 30], [464, 404, 30, 30], [465, 434, 30, 30], [466, 464, 30, 30], [467, 494, 30, 30], [468, 524, 30, 30], [469, 554, 30, 30], [470, 584, 30, 30], [471, 614, 30, 30], [472, 644, 30, 30], [473, 674, 30, 30], [474, 704, 30, 30], [475, 734, 30, 30], [476, 764, 30, 30], [477, 794, 30, 30], [478, 824, 30, 30], [479, 854, 30, 30], [480, 0, 30, 13], [480, 884, 420, 1], [481, 13, 30, 30], [482, 43, 30, 30], [483, 73, 30, 30], [484, 103, 30, 30], [485, 133, 30, 30], [486, 163, 30, 30], [487, 193, 30, 30], [488, 223, 30, 30], [489, 253, 30, 30], [490, 283, 30, 30], [491, 313, 30, 30], [492, 343, 30, 30], [493, 373, 30, 30], [494, 403, 30, 30], [495, 433, 30, 30], [496, 463, 30, 30], [497, 493, 30, 30], [498, 523, 30, 30], [499, 553, 30, 30], [500, 583, 30, 30], [501, 613, 30, 30], [502, 643, 30, 30], [503, 673, 30, 30], [504, 703, 30, 30], [505, 733, 30, 30], [506, 763, 30, 30], [507, 793, 30, 30], [508, 823, 30, 30], [509, 853, 30, 30], [510, 0, 30, 12], [510, 883, 390, 1], [511, 12, 30, 30], [512, 42, 30, 30], [513, 72, 30, 30], [514, 102, 30, 30], [515, 132, 30, 30], [516, 162, 30, 30], [517, 192, 30, 30], [518, 222, 30, 30], [519, 252, 30, 30], [520, 282, 30, 30], [521, 312, 30, 30], [522, 342, 30, 30], [523, 372, 30, 30], [524, 402, 30, 30], [525, 432, 30, 30], [526, 462, 30, 30], [527, 492, 30, 30], [528, 522, 30, 30], [529, 552, 30, 30], [530, 582, 30, 30], [531, 612, 30, 30], [532, 642, 30, 30], [533, 672, 30, 30], [534, 702, 30, 30], [535, 732, 30, 30], [536, 762, 30, 30], [537, 792, 30, 30], [538, 822, 30, 30], [539, 852, 30, 30], [540, 0, 30, 11], [540, 882, 360, 1], [541, 11, 30, 30], [542, 41, 30, 30], [543, 71, 30, 30], [544, 101, 30, 30], [545, 131, 30, 30], [546, 161, 30, 30], [547, 191, 30, 30], [548, 221, 30, 30], [549, 251, 30, 30], [550, 281, 30, 30], [551, 311, 30, 30], [552, 341, 30, 30], [553, 371, 30, 30], [554, 401, 30, 30], [555, 431, 30, 30], [556, 461, 30, 30], [557, 491, 30, 30], [558, 521, 30, 30], [559, 551, 30, 30], [560, 581, 30, 30], [561, 611, 30, 30], [562, 641, 30, 30], [563, 671, 30, 30], [564, 701, 30, 30], [565, 731, 30, 30], [566, 761, 30, 30], [567, 791, 30, 30], [568, 821, 30, 30], [569, 851, 30, 30], [570, 0, 30, 10], [570, 881, 330, 1], [571, 10, 30, 30], [572, 40, 30, 30], [573, 70, 30, 30], [574, 100, 30, 30], [575, 130, 30, 30], [576, 160, 30, 30], [577, 190, 30, 30], [578, 220, 30, 30], [579, 250, 30, 30], [580, 280, 30, 30], [581, 310, 30, 30], [582, 340, 30, 30], [583, 370, 30, 30], [584, 400, 30, 30], [585, 430, 30, 30], [586, 460, 30, 30], [587, 490, 30, 30], [588, 520, 30, 30], [589, 550, 30, 30], [590, 580, 30, 30], [591, 610, 30, 30], [592, 640, 30, 30], [593, 670, 30, 30], [594, 700, 30, 30], [595, 730, 30, 30], [596, 760, 30, 30], [597, 790, 30, 30], [598, 820, 30, 30], [599, 850, 30, 30], [600, 0, 30, 9], [600, 880, 300, 1], [601, 9, 30, 30], [602, 39, 30, 30], [603, 69, 30, 30], [604, 99, 30, 30], [605, 129, 30, 30], [606, 159, 30, 30], [607, 189, 30, 30], [608, 219, 30, 30], [609, 249, 30, 30], [610, 279, 30, 30], [611, 309, 30, 30], [612, 339, 30, 30], [613, 369, 30, 30], [614, 399, 30, 30], [615, 429, 30, 30], [616, 459, 30, 30], [617, 489, 30, 30], [618, 519, 30, 30], [619, 549, 30, 30], [620, 579, 30, 30], [621, 609, 30, 30], [622, 639, 30, 30], [623, 669, 30, 30], [624, 699, 30, 30], [625, 729, 30, 30], [626, 759, 30, 30], [627, 789, 30, 30], [628, 819, 30, 30], [629, 849, 30, 30], [630, 0, 30, 8], [630, 879, 270, 1], [631, 8, 30, 30], [632, 38, 30, 30], [633, 68, 30, 30], [634, 98, 30, 30], [635, 128, 30, 30], [636, 158, 30, 30], [637, 188, 30, 30], [638, 218, 30, 30], [639, 248, 30, 30], [640, 278, 30, 30], [641, 308, 30, 30], [642, 338, 30, 30], [643, 368, 30, 30], [644, 398, 30, 30], [645, 428, 30, 30], [646, 458, 30, 30], [647, 488, 30, 30], [648, 518, 30, 30], [649, 548, 30, 30], [650, 578, 30, 30], [651, 608, 30, 30], [652, 638, 30, 30], [653, 668, 30, 30], [654, 698, 30, 30], [655, 728, 30, 30], [656, 758, 30, 30], [657, 788, 30, 30], [658, 818, 30, 30], [659, 848, 30, 30], [660, 0, 30, 7], [660, 878, 240, 1], [661, 7, 30, 30], [662, 37, 30, 30], [663, 67, 30, 30], [664, 97, 30, 30], [665, 127, 30, 30], [666, 157, 30, 30], [667, 187, 30, 30], [668, 217, 30, 30], [669, 247, 30, 30], [670, 277, 30, 30], [671, 307, 30, 30], [672, 337, 30, 30], [673, 367, 30, 30], [674, 397, 30, 30], [675, 427, 30, 30], [676, 457, 30, 30], [677, 487, 30, 30], [678, 517, 30, 30], [679, 547, 30, 30], [680, 577, 30, 30], [681, 607, 30, 30], [682, 637, 30, 30], [683, 667, 30, 30], [684, 697, 30, 30], [685, 727, 30, 30], [686, 757, 30, 30], [687, 787, 30, 30], [688, 817, 30, 30], [689, 847, 30, 30], [690, 0, 30, 6], [690, 877, 210, 1], [691, 6, 30, 30], [692, 36, 30, 30], [693, 66, 30, 30], [694, 96, 30, 30], [695, 126, 30, 30], [696, 156, 30, 30], [697, 186, 30, 30], [698, 216, 30, 30], [699, 246, 30, 30], [700, 276, 30, 30], [701, 306, 30, 30], [702, 336, 30, 30], [703, 366, 30, 30], [704, 396, 30, 30], [705, 426, 30, 30], [706, 456, 30, 30], [707, 486, 30, 30], [708, 516, 30, 30], [709, 546, 30, 30], [710, 576, 30, 30], [711, 606, 30, 30], [712, 636, 30, 30], [713, 666, 30, 30], [714, 696, 30, 30], [715, 726, 30, 30], [716, 756, 30, 30], [717, 786, 30, 30], [718, 816, 30, 30], [719, 846, 30, 30], [720, 0, 30, 5], [720, 876, 180, 1], [721, 5, 30, 30], [722, 35, 30, 30], [723, 65, 30, 30], [724, 95, 30, 30], [725, 125, 30, 30], [726, 155, 30, 30], [727, 185, 30, 30], [728, 215, 30, 30], [729, 245, 30, 30], [730, 275, 30, 30], [731, 305, 30, 30], [732, 335, 30, 30], [733, 365, 30, 30], [734, 395, 30, 30], [735, 425, 30, 30], [736, 455, 30, 30], [737, 485, 30, 30], [738, 515, 30, 30], [739, 545, 30, 30], [740, 575, 30, 30], [741, 605, 30, 30], [742, 635, 30, 30], [743, 665, 30, 30], [744, 695, 30, 30], [745, 725, 30, 30], [746, 755, 30, 30], [747, 785, 30, 30], [748, 815, 30, 30], [749, 845, 30, 30], [750, 0, 30, 4], [750, 875, 150, 1], [751, 4, 30, 30], [752, 34, 30, 30], [753, 64, 30, 30], [754, 94, 30, 30], [755, 124, 30, 30], [756, 154, 30, 30], [757, 184, 30, 30], [758, 214, 30, 30], [759, 244, 30, 30], [760, 274, 30, 30], [761, 304, 30, 30], [762, 334, 30, 30], [763, 364, 30, 30], [764, 394, 30, 30], [765, 424, 30, 30], [766, 454, 30, 30], [767, 484, 30, 30], [768, 514, 30, 30], [769, 544, 30, 30], [770, 574, 30, 30], [771, 604, 30, 30], [772, 634, 30, 30], [773, 664, 30, 30], [774, 694, 30, 30], [775, 724, 30, 30], [776, 754, 30, 30], [777, 784, 30, 30], [778, 814, 30, 30], [779, 844, 30, 30], [780, 0, 30, 3], [780, 874, 120, 1], [781, 3, 30, 30], [782, 33, 30, 30], [783, 63, 30, 30], [784, 93, 30, 30], [785, 123, 30, 30], [786, 153, 30, 30], [787, 183, 30, 30], [788, 213, 30, 30], [789, 243, 30, 30], [790, 273, 30, 30], [791, 303, 30, 30], [792, 333, 30, 30], [793, 363, 30, 30], [794, 393, 30, 30], [795, 423, 30, 30], [796, 453, 30, 30], [797, 483, 30, 30], [798, 513, 30, 30], [799, 543, 30, 30], [800, 573, 30, 30], [801, 603, 30, 30], [802, 633, 30, 30], [803, 663, 30, 30], [804, 693, 30, 30], [805, 723, 30, 30], [806, 753, 30, 30], [807, 783, 30, 30], [808, 813, 30, 30], [809, 843, 30, 30], [810, 0, 30, 2], [810, 873, 90, 1], [811, 2, 30, 30], [812, 32, 30, 30], [813, 62, 30, 30], [814, 92, 30, 30], [815, 122, 30, 30], [816, 152, 30, 30], [817, 182, 30, 30], [818, 212, 30, 30], [819, 242, 30, 30], [820, 272, 30, 30], [821, 302, 30, 30], [822, 332, 30, 30], [823, 362, 30, 30], [824, 392, 30, 30], [825, 422, 30, 30], [826, 452, 30, 30], [827, 482, 30, 30], [828, 512, 30, 30], [829, 542, 30, 30], [830, 572, 30, 30], [831, 602, 30, 30], [832, 632, 30, 30], [833, 662, 30, 30], [834, 692, 30, 30], [835, 722, 30, 30], [836, 752, 30, 30], [837, 782, 30, 30], [838, 812, 30, 30], [839, 842, 30, 30], [840, 0, 30, 1], [840, 872, 60, 1], [841, 1, 30, 30], [842, 31, 30, 30], [843, 61, 30, 30], [844, 91, 30, 30], [845, 121, 30, 30], [846, 151, 30, 30], [847, 181, 30, 30], [848, 211, 30, 30], [849, 241, 30, 30], [850, 271, 30, 30], [851, 301, 30, 30], [852, 331, 30, 30], [853, 361, 30, 30], [854, 391, 30, 30], [855, 421, 30, 30], [856, 451, 30, 30], [857, 481, 30, 30], [858, 511, 30, 30], [859, 541, 30, 30], [860, 571, 30, 30], [861, 601, 30, 30], [862, 631, 30, 30], [863, 661, 30, 30], [864, 691, 30, 30], [865, 721, 30, 30], [866, 751, 30, 30], [867, 781, 30, 30], [868, 811, 30, 30], [869, 841, 30, 30], [870, 871, 30, 1], [871, 0, 29, 30], [872, 30, 28, 30], [873, 60, 27, 30], [874, 90, 26, 30], [875, 120, 25, 30], [876, 150, 24, 30], [877, 180, 23, 30], [878, 210, 22, 30], [879, 240, 21, 30], [880, 270, 20, 30], [881, 300, 19, 30], [882, 330, 18, 30], [883, 360, 17, 30], [884, 390, 16, 30], [885, 420, 15, 30], [886, 450, 14, 30], [887, 480, 13, 30], [888, 510, 12, 30], [889, 540, 11, 30], [890, 570, 10, 30], [891, 600, 9, 30], [892, 630, 8, 30], [893, 660, 7, 30], [894, 690, 6, 30], [895, 720, 5, 30], [896, 750, 4, 30], [897, 780, 3, 30], [898, 810, 2, 30], [899, 840, 1, 30]]}
|
| 5 |
+
RLMATH_EOF
|
tasks/construct-ae-p65-imo2025-p6-tiling-l5-s0/tests/check.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""IMO 2025 Problem 6 variant (AlphaEvolve problem 65): at most T rectangular tiles on an n x n grid, no overlaps,
|
| 2 |
+
every row and every column has exactly one uncovered unit square."""
|
| 3 |
+
import numpy as np
|
| 4 |
+
|
| 5 |
+
from run import Invalid, int_list
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
def check(inst, ans):
|
| 9 |
+
n, cap = inst["n"], inst["max_tiles"]
|
| 10 |
+
tiles = ans.get("tiles")
|
| 11 |
+
if not isinstance(tiles, list) or not (1 <= len(tiles) <= cap):
|
| 12 |
+
raise Invalid(f"tiles must be a list of 1..{cap} [row, col, height, width] entries")
|
| 13 |
+
cover = np.zeros((n, n), dtype=np.int32)
|
| 14 |
+
for t in tiles:
|
| 15 |
+
r, c, h, w = int_list(t, 4, 0, n, "tile")
|
| 16 |
+
if h < 1 or w < 1 or r + h > n or c + w > n:
|
| 17 |
+
raise Invalid(f"tile {t} is empty or leaves the grid")
|
| 18 |
+
cover[r:r + h, c:c + w] += 1
|
| 19 |
+
if cover.max() > 1:
|
| 20 |
+
raise Invalid("tiles overlap")
|
| 21 |
+
free = cover == 0
|
| 22 |
+
if not (free.sum(axis=1) == 1).all() or not (free.sum(axis=0) == 1).all():
|
| 23 |
+
raise Invalid("some row or column does not have exactly one uncovered square")
|
| 24 |
+
return None, {"tiles": len(tiles)}
|
tasks/construct-ae-p65-imo2025-p6-tiling-l5-s0/tests/instance.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"n": 900, "max_tiles": 957, "family": "ae_p65_imo2025_p6_tiling", "subset": "construct"}
|
tasks/construct-ae-p65-imo2025-p6-tiling-l5-s0/tests/run.py
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""rlmath runtime grader. Copied into every task as /tests/run.py next to /tests/check.py.
|
| 2 |
+
|
| 3 |
+
Deterministic; no LLM in the reward path. Runs with python3 + numpy/scipy/sympy/networkx only.
|
| 4 |
+
|
| 5 |
+
python3 /tests/run.py /tests/instance.json /workdir/answer.json
|
| 6 |
+
|
| 7 |
+
Prints the reward in [0, 1] and writes /logs/verifier/details.json when that directory exists.
|
| 8 |
+
|
| 9 |
+
check.py must define check(inst, ans) -> (value, extra_dict) and raise Invalid for a bad answer.
|
| 10 |
+
construct : value is ignored; a returned check means the witness is valid -> reward 1.0
|
| 11 |
+
optimize : value is the raw objective; reward = 0.1 + 0.9 * progress, where
|
| 12 |
+
progress = clip((s - baseline) / (best_known - baseline), 0, 1) (maximize)
|
| 13 |
+
clip((baseline - s) / (baseline - best_known), 0, 1) (minimize)
|
| 14 |
+
inst must carry "direction", "baseline", "best_known".
|
| 15 |
+
"""
|
| 16 |
+
import json
|
| 17 |
+
import math
|
| 18 |
+
import os
|
| 19 |
+
import sys
|
| 20 |
+
|
| 21 |
+
VALID_FLOOR = 0.1
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
class Invalid(Exception):
|
| 25 |
+
pass
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
# ------------------------------------------------------------ input helpers
|
| 29 |
+
|
| 30 |
+
def int_list(v, n=None, lo=None, hi=None, name="list"):
|
| 31 |
+
if not isinstance(v, list):
|
| 32 |
+
raise Invalid(f"{name} must be a list")
|
| 33 |
+
if n is not None and len(v) != n:
|
| 34 |
+
raise Invalid(f"{name} must have length {n}, got {len(v)}")
|
| 35 |
+
for x in v:
|
| 36 |
+
if isinstance(x, bool) or not isinstance(x, int):
|
| 37 |
+
raise Invalid(f"{name} must contain integers only")
|
| 38 |
+
if (lo is not None and x < lo) or (hi is not None and x > hi):
|
| 39 |
+
raise Invalid(f"{name} entry {x} out of range [{lo}, {hi}]")
|
| 40 |
+
return v
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
def as_int(x, name="value", lo=None, hi=None):
|
| 44 |
+
return int_list([x], 1, lo, hi, name)[0]
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
def num(x, name="value"):
|
| 48 |
+
if isinstance(x, bool) or not isinstance(x, (int, float)):
|
| 49 |
+
raise Invalid(f"{name} must be a number")
|
| 50 |
+
if not math.isfinite(x):
|
| 51 |
+
raise Invalid(f"{name} is not finite")
|
| 52 |
+
return float(x)
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
def float_matrix(v, rows=None, cols=None, name="matrix"):
|
| 56 |
+
if not isinstance(v, list) or (rows is not None and len(v) != rows):
|
| 57 |
+
raise Invalid(f"{name} must be a list of {rows} rows")
|
| 58 |
+
out = []
|
| 59 |
+
for r in v:
|
| 60 |
+
if not isinstance(r, list) or (cols is not None and len(r) != cols):
|
| 61 |
+
raise Invalid(f"each row of {name} must have {cols} numbers")
|
| 62 |
+
out.append([num(x, name) for x in r])
|
| 63 |
+
return out
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
def float_list(v, n=None, name="list"):
|
| 67 |
+
if not isinstance(v, list) or (n is not None and len(v) != n):
|
| 68 |
+
raise Invalid(f"{name} must be a list of length {n}")
|
| 69 |
+
return [num(x, name) for x in v]
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
# ------------------------------------------------------------------ reward
|
| 73 |
+
|
| 74 |
+
def optimize_reward(inst, s):
|
| 75 |
+
b, best = inst["baseline"], inst["best_known"]
|
| 76 |
+
if inst.get("progress_scale") == "log":
|
| 77 |
+
# for non-negative losses spanning orders of magnitude (e.g. overlap loss -> 0);
|
| 78 |
+
# progress is measured in log10(value + floor)
|
| 79 |
+
f = inst.get("log_floor", 1e-3)
|
| 80 |
+
b, best, s = (math.log10(max(x, 0.0) + f) for x in (b, best, s))
|
| 81 |
+
if inst["direction"] == "maximize":
|
| 82 |
+
p = (s - b) / (best - b)
|
| 83 |
+
else:
|
| 84 |
+
p = (b - s) / (b - best)
|
| 85 |
+
return VALID_FLOOR + (1 - VALID_FLOOR) * max(0.0, min(1.0, p))
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
def grade(inst, ans, check):
|
| 89 |
+
try:
|
| 90 |
+
if not isinstance(ans, dict):
|
| 91 |
+
raise Invalid("answer must be a JSON object")
|
| 92 |
+
value, extra = check(inst, ans)
|
| 93 |
+
if inst.get("subset") == "optimize":
|
| 94 |
+
s = float(value)
|
| 95 |
+
if not math.isfinite(s):
|
| 96 |
+
raise Invalid("non-finite score")
|
| 97 |
+
return optimize_reward(inst, s), {"valid": True, "raw_score": s, **(extra or {})}
|
| 98 |
+
return 1.0, {"valid": True, **(extra or {})}
|
| 99 |
+
except Invalid as e:
|
| 100 |
+
return 0.0, {"valid": False, "error": str(e)}
|
| 101 |
+
except Exception as e: # any malformed answer
|
| 102 |
+
return 0.0, {"valid": False, "error": f"{type(e).__name__}: {e}"}
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
def main():
|
| 106 |
+
here = os.path.dirname(os.path.abspath(__file__))
|
| 107 |
+
sys.path.insert(0, here)
|
| 108 |
+
# import ourselves as `run` so check.py's `from run import Invalid` is the same class
|
| 109 |
+
import run as R # noqa: E402
|
| 110 |
+
import check as family # noqa: E402
|
| 111 |
+
|
| 112 |
+
inst = json.load(open(sys.argv[1]))
|
| 113 |
+
try:
|
| 114 |
+
ans = json.load(open(sys.argv[2]))
|
| 115 |
+
except Exception as e:
|
| 116 |
+
reward, det = 0.0, {"valid": False, "error": f"unreadable answer: {e}"}
|
| 117 |
+
else:
|
| 118 |
+
reward, det = R.grade(inst, ans, family.check)
|
| 119 |
+
det["reward"] = reward
|
| 120 |
+
if os.path.isdir("/logs/verifier"):
|
| 121 |
+
with open("/logs/verifier/details.json", "w") as f:
|
| 122 |
+
json.dump(det, f)
|
| 123 |
+
print(reward)
|
| 124 |
+
|
| 125 |
+
|
| 126 |
+
if __name__ == "__main__":
|
| 127 |
+
main()
|
tasks/construct-ae-p65-imo2025-p6-tiling-l5-s0/tests/test.sh
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
mkdir -p /logs/verifier
|
| 3 |
+
if [ ! -s /workdir/answer.json ]; then
|
| 4 |
+
echo '{"valid": false, "error": "no /workdir/answer.json"}' > /logs/verifier/details.json
|
| 5 |
+
echo 0 > /logs/verifier/reward.txt
|
| 6 |
+
exit 0
|
| 7 |
+
fi
|
| 8 |
+
timeout 290 python3 /tests/run.py /tests/instance.json /workdir/answer.json \
|
| 9 |
+
> /logs/verifier/reward.txt 2> /logs/verifier/grader.log || echo 0 > /logs/verifier/reward.txt
|
tasks/construct-mc-all-interval-l2-s2/environment/Dockerfile
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11.16-slim
|
| 2 |
+
RUN apt-get update && apt-get install -y --no-install-recommends tmux curl git procps build-essential \
|
| 3 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 4 |
+
RUN pip install --no-cache-dir numpy==2.4.6 scipy==1.17.1 sympy==1.14.0 networkx==3.6.1 \
|
| 5 |
+
python-sat==1.9.dev15 z3-solver==5.1.0.0 PuLP==3.3.2 ortools==9.15.6755
|
| 6 |
+
WORKDIR /workdir
|
| 7 |
+
COPY instance.json /workdir/instance.json
|
tasks/construct-mc-all-interval-l2-s2/environment/instance.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"n": 11, "fixed": [], "family": "mc_all_interval", "subset": "construct"}
|
tasks/construct-mc-all-interval-l2-s2/solution/solve.sh
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
# oracle: a known valid construction (planted witness or published solution)
|
| 3 |
+
cat > /workdir/answer.json <<'RLMATH_EOF'
|
| 4 |
+
{"x": [0, 10, 1, 9, 2, 8, 3, 7, 4, 6, 5]}
|
| 5 |
+
RLMATH_EOF
|
tasks/construct-mc-all-interval-l2-s2/tests/check.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""All-interval series of size n (MathConstraint all_interval, CC-BY-4.0). Accepts any valid series."""
|
| 2 |
+
from run import Invalid, int_list
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
def check(inst, ans):
|
| 6 |
+
n = inst["n"]
|
| 7 |
+
x = int_list(ans.get("x"), n, 0, n - 1, "x")
|
| 8 |
+
if sorted(x) != list(range(n)):
|
| 9 |
+
raise Invalid("x is not a permutation of 0..n-1")
|
| 10 |
+
d = [abs(x[i + 1] - x[i]) for i in range(n - 1)]
|
| 11 |
+
if sorted(d) != list(range(1, n)):
|
| 12 |
+
raise Invalid("consecutive differences are not a permutation of 1..n-1")
|
| 13 |
+
seqs = {"x": x, "d": d}
|
| 14 |
+
for name, i, v in inst.get("fixed", []):
|
| 15 |
+
if seqs[name][i] != v:
|
| 16 |
+
raise Invalid(f"fixed value {name}[{i}] = {v} not respected")
|
| 17 |
+
return None, {}
|
tasks/construct-mc-all-interval-l2-s2/tests/instance.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"n": 11, "fixed": [], "family": "mc_all_interval", "subset": "construct"}
|
tasks/construct-mc-all-interval-l2-s2/tests/run.py
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""rlmath runtime grader. Copied into every task as /tests/run.py next to /tests/check.py.
|
| 2 |
+
|
| 3 |
+
Deterministic; no LLM in the reward path. Runs with python3 + numpy/scipy/sympy/networkx only.
|
| 4 |
+
|
| 5 |
+
python3 /tests/run.py /tests/instance.json /workdir/answer.json
|
| 6 |
+
|
| 7 |
+
Prints the reward in [0, 1] and writes /logs/verifier/details.json when that directory exists.
|
| 8 |
+
|
| 9 |
+
check.py must define check(inst, ans) -> (value, extra_dict) and raise Invalid for a bad answer.
|
| 10 |
+
construct : value is ignored; a returned check means the witness is valid -> reward 1.0
|
| 11 |
+
optimize : value is the raw objective; reward = 0.1 + 0.9 * progress, where
|
| 12 |
+
progress = clip((s - baseline) / (best_known - baseline), 0, 1) (maximize)
|
| 13 |
+
clip((baseline - s) / (baseline - best_known), 0, 1) (minimize)
|
| 14 |
+
inst must carry "direction", "baseline", "best_known".
|
| 15 |
+
"""
|
| 16 |
+
import json
|
| 17 |
+
import math
|
| 18 |
+
import os
|
| 19 |
+
import sys
|
| 20 |
+
|
| 21 |
+
VALID_FLOOR = 0.1
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
class Invalid(Exception):
|
| 25 |
+
pass
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
# ------------------------------------------------------------ input helpers
|
| 29 |
+
|
| 30 |
+
def int_list(v, n=None, lo=None, hi=None, name="list"):
|
| 31 |
+
if not isinstance(v, list):
|
| 32 |
+
raise Invalid(f"{name} must be a list")
|
| 33 |
+
if n is not None and len(v) != n:
|
| 34 |
+
raise Invalid(f"{name} must have length {n}, got {len(v)}")
|
| 35 |
+
for x in v:
|
| 36 |
+
if isinstance(x, bool) or not isinstance(x, int):
|
| 37 |
+
raise Invalid(f"{name} must contain integers only")
|
| 38 |
+
if (lo is not None and x < lo) or (hi is not None and x > hi):
|
| 39 |
+
raise Invalid(f"{name} entry {x} out of range [{lo}, {hi}]")
|
| 40 |
+
return v
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
def as_int(x, name="value", lo=None, hi=None):
|
| 44 |
+
return int_list([x], 1, lo, hi, name)[0]
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
def num(x, name="value"):
|
| 48 |
+
if isinstance(x, bool) or not isinstance(x, (int, float)):
|
| 49 |
+
raise Invalid(f"{name} must be a number")
|
| 50 |
+
if not math.isfinite(x):
|
| 51 |
+
raise Invalid(f"{name} is not finite")
|
| 52 |
+
return float(x)
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
def float_matrix(v, rows=None, cols=None, name="matrix"):
|
| 56 |
+
if not isinstance(v, list) or (rows is not None and len(v) != rows):
|
| 57 |
+
raise Invalid(f"{name} must be a list of {rows} rows")
|
| 58 |
+
out = []
|
| 59 |
+
for r in v:
|
| 60 |
+
if not isinstance(r, list) or (cols is not None and len(r) != cols):
|
| 61 |
+
raise Invalid(f"each row of {name} must have {cols} numbers")
|
| 62 |
+
out.append([num(x, name) for x in r])
|
| 63 |
+
return out
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
def float_list(v, n=None, name="list"):
|
| 67 |
+
if not isinstance(v, list) or (n is not None and len(v) != n):
|
| 68 |
+
raise Invalid(f"{name} must be a list of length {n}")
|
| 69 |
+
return [num(x, name) for x in v]
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
# ------------------------------------------------------------------ reward
|
| 73 |
+
|
| 74 |
+
def optimize_reward(inst, s):
|
| 75 |
+
b, best = inst["baseline"], inst["best_known"]
|
| 76 |
+
if inst.get("progress_scale") == "log":
|
| 77 |
+
# for non-negative losses spanning orders of magnitude (e.g. overlap loss -> 0);
|
| 78 |
+
# progress is measured in log10(value + floor)
|
| 79 |
+
f = inst.get("log_floor", 1e-3)
|
| 80 |
+
b, best, s = (math.log10(max(x, 0.0) + f) for x in (b, best, s))
|
| 81 |
+
if inst["direction"] == "maximize":
|
| 82 |
+
p = (s - b) / (best - b)
|
| 83 |
+
else:
|
| 84 |
+
p = (b - s) / (b - best)
|
| 85 |
+
return VALID_FLOOR + (1 - VALID_FLOOR) * max(0.0, min(1.0, p))
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
def grade(inst, ans, check):
|
| 89 |
+
try:
|
| 90 |
+
if not isinstance(ans, dict):
|
| 91 |
+
raise Invalid("answer must be a JSON object")
|
| 92 |
+
value, extra = check(inst, ans)
|
| 93 |
+
if inst.get("subset") == "optimize":
|
| 94 |
+
s = float(value)
|
| 95 |
+
if not math.isfinite(s):
|
| 96 |
+
raise Invalid("non-finite score")
|
| 97 |
+
return optimize_reward(inst, s), {"valid": True, "raw_score": s, **(extra or {})}
|
| 98 |
+
return 1.0, {"valid": True, **(extra or {})}
|
| 99 |
+
except Invalid as e:
|
| 100 |
+
return 0.0, {"valid": False, "error": str(e)}
|
| 101 |
+
except Exception as e: # any malformed answer
|
| 102 |
+
return 0.0, {"valid": False, "error": f"{type(e).__name__}: {e}"}
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
def main():
|
| 106 |
+
here = os.path.dirname(os.path.abspath(__file__))
|
| 107 |
+
sys.path.insert(0, here)
|
| 108 |
+
# import ourselves as `run` so check.py's `from run import Invalid` is the same class
|
| 109 |
+
import run as R # noqa: E402
|
| 110 |
+
import check as family # noqa: E402
|
| 111 |
+
|
| 112 |
+
inst = json.load(open(sys.argv[1]))
|
| 113 |
+
try:
|
| 114 |
+
ans = json.load(open(sys.argv[2]))
|
| 115 |
+
except Exception as e:
|
| 116 |
+
reward, det = 0.0, {"valid": False, "error": f"unreadable answer: {e}"}
|
| 117 |
+
else:
|
| 118 |
+
reward, det = R.grade(inst, ans, family.check)
|
| 119 |
+
det["reward"] = reward
|
| 120 |
+
if os.path.isdir("/logs/verifier"):
|
| 121 |
+
with open("/logs/verifier/details.json", "w") as f:
|
| 122 |
+
json.dump(det, f)
|
| 123 |
+
print(reward)
|
| 124 |
+
|
| 125 |
+
|
| 126 |
+
if __name__ == "__main__":
|
| 127 |
+
main()
|
tasks/construct-mc-all-interval-l2-s2/tests/test.sh
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
mkdir -p /logs/verifier
|
| 3 |
+
if [ ! -s /workdir/answer.json ]; then
|
| 4 |
+
echo '{"valid": false, "error": "no /workdir/answer.json"}' > /logs/verifier/details.json
|
| 5 |
+
echo 0 > /logs/verifier/reward.txt
|
| 6 |
+
exit 0
|
| 7 |
+
fi
|
| 8 |
+
timeout 290 python3 /tests/run.py /tests/instance.json /workdir/answer.json \
|
| 9 |
+
> /logs/verifier/reward.txt 2> /logs/verifier/grader.log || echo 0 > /logs/verifier/reward.txt
|
tasks/construct-mc-all-interval-l2-s5/environment/Dockerfile
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11.16-slim
|
| 2 |
+
RUN apt-get update && apt-get install -y --no-install-recommends tmux curl git procps build-essential \
|
| 3 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 4 |
+
RUN pip install --no-cache-dir numpy==2.4.6 scipy==1.17.1 sympy==1.14.0 networkx==3.6.1 \
|
| 5 |
+
python-sat==1.9.dev15 z3-solver==5.1.0.0 PuLP==3.3.2 ortools==9.15.6755
|
| 6 |
+
WORKDIR /workdir
|
| 7 |
+
COPY instance.json /workdir/instance.json
|
tasks/construct-mc-all-interval-l2-s5/environment/instance.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"n": 8, "fixed": [], "family": "mc_all_interval", "subset": "construct"}
|
tasks/construct-mc-all-interval-l2-s5/solution/solve.sh
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
# oracle: a known valid construction (planted witness or published solution)
|
| 3 |
+
cat > /workdir/answer.json <<'RLMATH_EOF'
|
| 4 |
+
{"x": [0, 7, 1, 6, 2, 5, 3, 4]}
|
| 5 |
+
RLMATH_EOF
|
tasks/construct-mc-all-interval-l2-s5/tests/check.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""All-interval series of size n (MathConstraint all_interval, CC-BY-4.0). Accepts any valid series."""
|
| 2 |
+
from run import Invalid, int_list
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
def check(inst, ans):
|
| 6 |
+
n = inst["n"]
|
| 7 |
+
x = int_list(ans.get("x"), n, 0, n - 1, "x")
|
| 8 |
+
if sorted(x) != list(range(n)):
|
| 9 |
+
raise Invalid("x is not a permutation of 0..n-1")
|
| 10 |
+
d = [abs(x[i + 1] - x[i]) for i in range(n - 1)]
|
| 11 |
+
if sorted(d) != list(range(1, n)):
|
| 12 |
+
raise Invalid("consecutive differences are not a permutation of 1..n-1")
|
| 13 |
+
seqs = {"x": x, "d": d}
|
| 14 |
+
for name, i, v in inst.get("fixed", []):
|
| 15 |
+
if seqs[name][i] != v:
|
| 16 |
+
raise Invalid(f"fixed value {name}[{i}] = {v} not respected")
|
| 17 |
+
return None, {}
|
tasks/construct-mc-all-interval-l2-s5/tests/instance.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"n": 8, "fixed": [], "family": "mc_all_interval", "subset": "construct"}
|
tasks/construct-mc-all-interval-l2-s5/tests/run.py
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""rlmath runtime grader. Copied into every task as /tests/run.py next to /tests/check.py.
|
| 2 |
+
|
| 3 |
+
Deterministic; no LLM in the reward path. Runs with python3 + numpy/scipy/sympy/networkx only.
|
| 4 |
+
|
| 5 |
+
python3 /tests/run.py /tests/instance.json /workdir/answer.json
|
| 6 |
+
|
| 7 |
+
Prints the reward in [0, 1] and writes /logs/verifier/details.json when that directory exists.
|
| 8 |
+
|
| 9 |
+
check.py must define check(inst, ans) -> (value, extra_dict) and raise Invalid for a bad answer.
|
| 10 |
+
construct : value is ignored; a returned check means the witness is valid -> reward 1.0
|
| 11 |
+
optimize : value is the raw objective; reward = 0.1 + 0.9 * progress, where
|
| 12 |
+
progress = clip((s - baseline) / (best_known - baseline), 0, 1) (maximize)
|
| 13 |
+
clip((baseline - s) / (baseline - best_known), 0, 1) (minimize)
|
| 14 |
+
inst must carry "direction", "baseline", "best_known".
|
| 15 |
+
"""
|
| 16 |
+
import json
|
| 17 |
+
import math
|
| 18 |
+
import os
|
| 19 |
+
import sys
|
| 20 |
+
|
| 21 |
+
VALID_FLOOR = 0.1
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
class Invalid(Exception):
|
| 25 |
+
pass
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
# ------------------------------------------------------------ input helpers
|
| 29 |
+
|
| 30 |
+
def int_list(v, n=None, lo=None, hi=None, name="list"):
|
| 31 |
+
if not isinstance(v, list):
|
| 32 |
+
raise Invalid(f"{name} must be a list")
|
| 33 |
+
if n is not None and len(v) != n:
|
| 34 |
+
raise Invalid(f"{name} must have length {n}, got {len(v)}")
|
| 35 |
+
for x in v:
|
| 36 |
+
if isinstance(x, bool) or not isinstance(x, int):
|
| 37 |
+
raise Invalid(f"{name} must contain integers only")
|
| 38 |
+
if (lo is not None and x < lo) or (hi is not None and x > hi):
|
| 39 |
+
raise Invalid(f"{name} entry {x} out of range [{lo}, {hi}]")
|
| 40 |
+
return v
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
def as_int(x, name="value", lo=None, hi=None):
|
| 44 |
+
return int_list([x], 1, lo, hi, name)[0]
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
def num(x, name="value"):
|
| 48 |
+
if isinstance(x, bool) or not isinstance(x, (int, float)):
|
| 49 |
+
raise Invalid(f"{name} must be a number")
|
| 50 |
+
if not math.isfinite(x):
|
| 51 |
+
raise Invalid(f"{name} is not finite")
|
| 52 |
+
return float(x)
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
def float_matrix(v, rows=None, cols=None, name="matrix"):
|
| 56 |
+
if not isinstance(v, list) or (rows is not None and len(v) != rows):
|
| 57 |
+
raise Invalid(f"{name} must be a list of {rows} rows")
|
| 58 |
+
out = []
|
| 59 |
+
for r in v:
|
| 60 |
+
if not isinstance(r, list) or (cols is not None and len(r) != cols):
|
| 61 |
+
raise Invalid(f"each row of {name} must have {cols} numbers")
|
| 62 |
+
out.append([num(x, name) for x in r])
|
| 63 |
+
return out
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
def float_list(v, n=None, name="list"):
|
| 67 |
+
if not isinstance(v, list) or (n is not None and len(v) != n):
|
| 68 |
+
raise Invalid(f"{name} must be a list of length {n}")
|
| 69 |
+
return [num(x, name) for x in v]
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
# ------------------------------------------------------------------ reward
|
| 73 |
+
|
| 74 |
+
def optimize_reward(inst, s):
|
| 75 |
+
b, best = inst["baseline"], inst["best_known"]
|
| 76 |
+
if inst.get("progress_scale") == "log":
|
| 77 |
+
# for non-negative losses spanning orders of magnitude (e.g. overlap loss -> 0);
|
| 78 |
+
# progress is measured in log10(value + floor)
|
| 79 |
+
f = inst.get("log_floor", 1e-3)
|
| 80 |
+
b, best, s = (math.log10(max(x, 0.0) + f) for x in (b, best, s))
|
| 81 |
+
if inst["direction"] == "maximize":
|
| 82 |
+
p = (s - b) / (best - b)
|
| 83 |
+
else:
|
| 84 |
+
p = (b - s) / (b - best)
|
| 85 |
+
return VALID_FLOOR + (1 - VALID_FLOOR) * max(0.0, min(1.0, p))
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
def grade(inst, ans, check):
|
| 89 |
+
try:
|
| 90 |
+
if not isinstance(ans, dict):
|
| 91 |
+
raise Invalid("answer must be a JSON object")
|
| 92 |
+
value, extra = check(inst, ans)
|
| 93 |
+
if inst.get("subset") == "optimize":
|
| 94 |
+
s = float(value)
|
| 95 |
+
if not math.isfinite(s):
|
| 96 |
+
raise Invalid("non-finite score")
|
| 97 |
+
return optimize_reward(inst, s), {"valid": True, "raw_score": s, **(extra or {})}
|
| 98 |
+
return 1.0, {"valid": True, **(extra or {})}
|
| 99 |
+
except Invalid as e:
|
| 100 |
+
return 0.0, {"valid": False, "error": str(e)}
|
| 101 |
+
except Exception as e: # any malformed answer
|
| 102 |
+
return 0.0, {"valid": False, "error": f"{type(e).__name__}: {e}"}
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
def main():
|
| 106 |
+
here = os.path.dirname(os.path.abspath(__file__))
|
| 107 |
+
sys.path.insert(0, here)
|
| 108 |
+
# import ourselves as `run` so check.py's `from run import Invalid` is the same class
|
| 109 |
+
import run as R # noqa: E402
|
| 110 |
+
import check as family # noqa: E402
|
| 111 |
+
|
| 112 |
+
inst = json.load(open(sys.argv[1]))
|
| 113 |
+
try:
|
| 114 |
+
ans = json.load(open(sys.argv[2]))
|
| 115 |
+
except Exception as e:
|
| 116 |
+
reward, det = 0.0, {"valid": False, "error": f"unreadable answer: {e}"}
|
| 117 |
+
else:
|
| 118 |
+
reward, det = R.grade(inst, ans, family.check)
|
| 119 |
+
det["reward"] = reward
|
| 120 |
+
if os.path.isdir("/logs/verifier"):
|
| 121 |
+
with open("/logs/verifier/details.json", "w") as f:
|
| 122 |
+
json.dump(det, f)
|
| 123 |
+
print(reward)
|
| 124 |
+
|
| 125 |
+
|
| 126 |
+
if __name__ == "__main__":
|
| 127 |
+
main()
|
tasks/construct-mc-all-interval-l2-s5/tests/test.sh
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
mkdir -p /logs/verifier
|
| 3 |
+
if [ ! -s /workdir/answer.json ]; then
|
| 4 |
+
echo '{"valid": false, "error": "no /workdir/answer.json"}' > /logs/verifier/details.json
|
| 5 |
+
echo 0 > /logs/verifier/reward.txt
|
| 6 |
+
exit 0
|
| 7 |
+
fi
|
| 8 |
+
timeout 290 python3 /tests/run.py /tests/instance.json /workdir/answer.json \
|
| 9 |
+
> /logs/verifier/reward.txt 2> /logs/verifier/grader.log || echo 0 > /logs/verifier/reward.txt
|
tasks/construct-mc-antimagic-square-l2-s0/environment/Dockerfile
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11.16-slim
|
| 2 |
+
RUN apt-get update && apt-get install -y --no-install-recommends tmux curl git procps build-essential \
|
| 3 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 4 |
+
RUN pip install --no-cache-dir numpy==2.4.6 scipy==1.17.1 sympy==1.14.0 networkx==3.6.1 \
|
| 5 |
+
python-sat==1.9.dev15 z3-solver==5.1.0.0 PuLP==3.3.2 ortools==9.15.6755
|
| 6 |
+
WORKDIR /workdir
|
| 7 |
+
COPY instance.json /workdir/instance.json
|