Publish IMO-ProofBench Harbor tasks
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- README.mdAdded+33
- subsets/advanced_tasks.jsonlAdded+30
- subsets/all_tasks.jsonlAdded+60
- subsets/basic_tasks.jsonlAdded+30
- tasks/manifest.jsonAdded+546
- tasks/pb-advanced-001/instruction.mdAdded+7
- tasks/pb-advanced-001/solution/solve.shAdded+89
- tasks/pb-advanced-001/task.tomlAdded+20
- tasks/pb-advanced-001/tests/grade_task.pyAdded+58
- tasks/pb-advanced-001/tests/reference.jsonAdded+12
- tasks/pb-advanced-001/tests/test.shAdded+10
- tasks/pb-advanced-002/instruction.mdAdded+7
- tasks/pb-advanced-002/solution/solve.shAdded+14
- tasks/pb-advanced-002/task.tomlAdded+20
- tasks/pb-advanced-002/tests/grade_task.pyAdded+58
- tasks/pb-advanced-002/tests/reference.jsonAdded+12
- tasks/pb-advanced-002/tests/test.shAdded+10
- tasks/pb-advanced-003/instruction.mdAdded+7
- tasks/pb-advanced-003/solution/solve.shAdded+87
- tasks/pb-advanced-003/task.tomlAdded+20
- tasks/pb-advanced-003/tests/grade_task.pyAdded+58
- tasks/pb-advanced-003/tests/reference.jsonAdded+12
- tasks/pb-advanced-003/tests/test.shAdded+10
- tasks/pb-advanced-004/instruction.mdAdded+7
- tasks/pb-advanced-004/solution/solve.shAdded+70
- tasks/pb-advanced-004/task.tomlAdded+20
- tasks/pb-advanced-004/tests/grade_task.pyAdded+58
- tasks/pb-advanced-004/tests/reference.jsonAdded+12
- tasks/pb-advanced-004/tests/test.shAdded+10
- tasks/pb-advanced-005/instruction.mdAdded+12
- tasks/pb-advanced-005/solution/solve.shAdded+163
- tasks/pb-advanced-005/task.tomlAdded+20
- tasks/pb-advanced-005/tests/grade_task.pyAdded+58
- tasks/pb-advanced-005/tests/reference.jsonAdded+12
- tasks/pb-advanced-005/tests/test.shAdded+10
- tasks/pb-advanced-006/instruction.mdAdded+12
- tasks/pb-advanced-006/solution/solve.shAdded+145
- tasks/pb-advanced-006/task.tomlAdded+20
- tasks/pb-advanced-006/tests/grade_task.pyAdded+58
- tasks/pb-advanced-006/tests/reference.jsonAdded+12
- tasks/pb-advanced-006/tests/test.shAdded+10
- tasks/pb-advanced-007/instruction.mdAdded+13
- tasks/pb-advanced-007/solution/solve.shAdded+51
- tasks/pb-advanced-007/task.tomlAdded+20
- tasks/pb-advanced-007/tests/grade_task.pyAdded+58
- tasks/pb-advanced-007/tests/reference.jsonAdded+12
- tasks/pb-advanced-007/tests/test.shAdded+10
- tasks/pb-advanced-008/instruction.mdAdded+17
- tasks/pb-advanced-008/solution/solve.shAdded+110
- tasks/pb-advanced-008/task.tomlAdded+20
123456789101112131415161718192021222324252627282930313233---license: apache-2.0tags:- library:harbor- harbor- math- proofs- evaluation- agent-environment---# IMO-ProofBench: Harbor tasks
60 natural-language mathematical proof tasks adapted from Google DeepMind's [IMO-ProofBench v2](https://github.com/google-deepmind/superhuman/blob/8cea546c9c7209306b4d4ced7c5eacd51f23f928/imobench/proofbench_v2.csv), part of IMO-Bench. The data is from *Towards Robust Mathematical Reasoning* ([Luong et al., EMNLP 2025](https://aclanthology.org/2025.emnlp-main.1794/)). We convert each source row into a Harbor task and retain the original problem, reference solution and grading guidelines. No GradingBench rows are included. Copyright 2025 Google LLC. Upstream software is [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0); its other materials, including benchmark content, are [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). The dataset card's Apache license tag refers to software; benchmark content remains CC BY 4.0. See [upstream license and citation](https://github.com/google-deepmind/superhuman/blob/main/imobench/README.md).
| Category | Basic | Advanced | Total ||---|---:|---:|---:|| Algebra | 8 | 8 | 16 || Combinatorics | 8 | 8 | 16 || Geometry | 6 | 8 | 14 || Number theory | 8 | 6 | 14 || Total | 30 | 30 | 60 |
Basic and Advanced are the groups in the problem IDs. The source `Level` is a separate difficulty label, retained as `difficulty` in references and manifests. Basic includes 8 pre-IMO, 14 IMO-easy, 8 IMO-medium; Advanced includes 10 each IMO-easy, IMO-medium and IMO-hard.
## Running and grading
Each `tasks/<task_id>` contains a Harbor 1.4 task, an instruction, a reference oracle and an offline verifier. The solver must produce `/app/proof.md` using its own reasoning and local tools without web lookups or external models. The verifier reads a regular single-link UTF-8 file of at most 200,000 bytes, rejecting symlinks in the path, hard links and special files. At least 20 non-whitespace characters are required. `PROOF` and `VERIFIER_DIR` override paths for local testing. The verifier copies the submission and `reference.json` to the verifier directory, alongside `grade.json` and `reward.txt`. Missing, invalid or too-short proofs receive reward 0; structurally valid submissions receive reward 1 and status `submitted_for_judge`. Invalid files use status `missing`, while short or whitespace-only files use `empty`.
**This reward measures submission validity only, not mathematical correctness.** An external rubric-guided LLM judge must evaluate the submitted proof against the reference solution and grading guidelines in `reference.json` and assign an IMO score from 0 to 7; report percentage as 100 × score / 7. No external judge is bundled, and an oracle pass demonstrates only structural validity. The reference solution is for evaluation and oracle testing and must not be exposed to the solver during an evaluation.
`tasks/manifest.json` indexes all tasks; `subsets/basic_tasks.jsonl`, `advanced_tasks.jsonl`, and `all_tasks.jsonl` index 30, 30, and 60 tasks respectively. Each JSONL row includes its task path and metadata.
For judge calibration, upstream [gradingbench.csv](https://github.com/google-deepmind/superhuman/blob/main/imobench/gradingbench.csv) contains 1,000 examples with columns `Grading ID`, `Problem ID`, `Problem`, `Solution`, `Grading guidelines`, `Response`, `Points`, `Reward`, and `Problem Source`. It is separate from this dataset and is not included as proof tasks.123456789101112131415161718192021222324252627282930{"task_id": "pb-advanced-001", "path": "tasks/pb-advanced-001", "problem_id": "PB-Advanced-001", "level": "advanced", "difficulty": "IMO-easy", "category": "Algebra", "source": "Novel Problem"}{"task_id": "pb-advanced-002", "path": "tasks/pb-advanced-002", "problem_id": "PB-Advanced-002", "level": "advanced", "difficulty": "IMO-medium", "category": "Combinatorics", "source": "Novel Problem"}{"task_id": "pb-advanced-003", "path": "tasks/pb-advanced-003", "problem_id": "PB-Advanced-003", "level": "advanced", "difficulty": "IMO-hard", "category": "Geometry", "source": "Novel Problem"}{"task_id": "pb-advanced-004", "path": "tasks/pb-advanced-004", "problem_id": "PB-Advanced-004", "level": "advanced", "difficulty": "IMO-easy", "category": "Combinatorics", "source": "Novel Problem"}{"task_id": "pb-advanced-005", "path": "tasks/pb-advanced-005", "problem_id": "PB-Advanced-005", "level": "advanced", "difficulty": "IMO-medium", "category": "Geometry", "source": "Novel Problem"}{"task_id": "pb-advanced-006", "path": "tasks/pb-advanced-006", "problem_id": "PB-Advanced-006", "level": "advanced", "difficulty": "IMO-hard", "category": "Algebra", "source": "Novel Problem"}{"task_id": "pb-advanced-007", "path": "tasks/pb-advanced-007", "problem_id": "PB-Advanced-007", "level": "advanced", "difficulty": "IMO-easy", "category": "Algebra", "source": "Novel Problem"}{"task_id": "pb-advanced-008", "path": "tasks/pb-advanced-008", "problem_id": "PB-Advanced-008", "level": "advanced", "difficulty": "IMO-medium", "category": "Number theory", "source": "Novel Problem"}{"task_id": "pb-advanced-009", "path": "tasks/pb-advanced-009", "problem_id": "PB-Advanced-009", "level": "advanced", "difficulty": "IMO-hard", "category": "Geometry", "source": "Novel Problem"}{"task_id": "pb-advanced-010", "path": "tasks/pb-advanced-010", "problem_id": "PB-Advanced-010", "level": "advanced", "difficulty": "IMO-medium", "category": "Geometry", "source": "Novel Problem"}{"task_id": "pb-advanced-011", "path": "tasks/pb-advanced-011", "problem_id": "PB-Advanced-011", "level": "advanced", "difficulty": "IMO-medium", "category": "Algebra", "source": "Novel Problem"}{"task_id": "pb-advanced-012", "path": "tasks/pb-advanced-012", "problem_id": "PB-Advanced-012", "level": "advanced", "difficulty": "IMO-hard", "category": "Number theory", "source": "Novel Problem"}{"task_id": "pb-advanced-013", "path": "tasks/pb-advanced-013", "problem_id": "PB-Advanced-013", "level": "advanced", "difficulty": "IMO-easy", "category": "Algebra", "source": "Novel Problem"}{"task_id": "pb-advanced-014", "path": "tasks/pb-advanced-014", "problem_id": "PB-Advanced-014", "level": "advanced", "difficulty": "IMO-medium", "category": "Combinatorics", "source": "Novel Problem"}{"task_id": "pb-advanced-015", "path": "tasks/pb-advanced-015", "problem_id": "PB-Advanced-015", "level": "advanced", "difficulty": "IMO-hard", "category": "Geometry", "source": "Novel Problem"}{"task_id": "pb-advanced-016", "path": "tasks/pb-advanced-016", "problem_id": "PB-Advanced-016", "level": "advanced", "difficulty": "IMO-easy", "category": "Geometry", "source": "Novel Problem"}{"task_id": "pb-advanced-017", "path": "tasks/pb-advanced-017", "problem_id": "PB-Advanced-017", "level": "advanced", "difficulty": "IMO-easy", "category": "Number theory", "source": "Novel Problem"}{"task_id": "pb-advanced-018", "path": "tasks/pb-advanced-018", "problem_id": "PB-Advanced-018", "level": "advanced", "difficulty": "IMO-hard", "category": "Combinatorics", "source": "Novel Problem"}{"task_id": "pb-advanced-019", "path": "tasks/pb-advanced-019", "problem_id": "PB-Advanced-019", "level": "advanced", "difficulty": "IMO-easy", "category": "Algebra", "source": "(Modified) IMO 2024 P1"}{"task_id": "pb-advanced-020", "path": "tasks/pb-advanced-020", "problem_id": "PB-Advanced-020", "level": "advanced", "difficulty": "IMO-medium", "category": "Number theory", "source": "(Modified) IMO 2024 P2"}{"task_id": "pb-advanced-021", "path": "tasks/pb-advanced-021", "problem_id": "PB-Advanced-021", "level": "advanced", "difficulty": "IMO-hard", "category": "Combinatorics", "source": "(Modified) IMO 2024 P3"}{"task_id": "pb-advanced-022", "path": "tasks/pb-advanced-022", "problem_id": "PB-Advanced-022", "level": "advanced", "difficulty": "IMO-easy", "category": "Geometry", "source": "(Modified) IMO 2024 P4"}{"task_id": "pb-advanced-023", "path": "tasks/pb-advanced-023", "problem_id": "PB-Advanced-023", "level": "advanced", "difficulty": "IMO-medium", "category": "Combinatorics", "source": "(Modified) IMO 2024 P5"}{"task_id": "pb-advanced-024", "path": "tasks/pb-advanced-024", "problem_id": "PB-Advanced-024", "level": "advanced", "difficulty": "IMO-hard", "category": "Algebra", "source": "(Modified) IMO 2024 P6"}{"task_id": "pb-advanced-025", "path": "tasks/pb-advanced-025", "problem_id": "PB-Advanced-025", "level": "advanced", "difficulty": "IMO-easy", "category": "Number theory", "source": "USAMO 2025"}{"task_id": "pb-advanced-026", "path": "tasks/pb-advanced-026", "problem_id": "PB-Advanced-026", "level": "advanced", "difficulty": "IMO-medium", "category": "Algebra", "source": "USAMO 2025"}{"task_id": "pb-advanced-027", "path": "tasks/pb-advanced-027", "problem_id": "PB-Advanced-027", "level": "advanced", "difficulty": "IMO-hard", "category": "Combinatorics", "source": "USAMO 2025"}{"task_id": "pb-advanced-028", "path": "tasks/pb-advanced-028", "problem_id": "PB-Advanced-028", "level": "advanced", "difficulty": "IMO-easy", "category": "Geometry", "source": "USAMO 2025"}{"task_id": "pb-advanced-029", "path": "tasks/pb-advanced-029", "problem_id": "PB-Advanced-029", "level": "advanced", "difficulty": "IMO-medium", "category": "Number theory", "source": "USAMO 2025"}{"task_id": "pb-advanced-030", "path": "tasks/pb-advanced-030", "problem_id": "PB-Advanced-030", "level": "advanced", "difficulty": "IMO-hard", "category": "Combinatorics", "source": "USAMO 2025"}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960{"task_id": "pb-basic-001", "path": "tasks/pb-basic-001", "problem_id": "PB-Basic-001", "level": "basic", "difficulty": "IMO-easy", "category": "Algebra", "source": "(Modified) IMO 2019, P1"}{"task_id": "pb-basic-002", "path": "tasks/pb-basic-002", "problem_id": "PB-Basic-002", "level": "basic", "difficulty": "pre-IMO", "category": "Algebra", "source": "(Modified) All-Russian MO 2013, Grade 11, P6"}{"task_id": "pb-basic-003", "path": "tasks/pb-basic-003", "problem_id": "PB-Basic-003", "level": "basic", "difficulty": "IMO-easy", "category": "Algebra", "source": "(Modified) Balkan MO 2023, P1"}{"task_id": "pb-basic-004", "path": "tasks/pb-basic-004", "problem_id": "PB-Basic-004", "level": "basic", "difficulty": "IMO-easy", "category": "Algebra", "source": "(Modified) VMO 2012, Day2 P3"}{"task_id": "pb-basic-005", "path": "tasks/pb-basic-005", "problem_id": "PB-Basic-005", "level": "basic", "difficulty": "IMO-easy", "category": "Algebra", "source": "(Modified) ELMO 2023 Shortlist A1"}{"task_id": "pb-basic-006", "path": "tasks/pb-basic-006", "problem_id": "PB-Basic-006", "level": "basic", "difficulty": "IMO-medium", "category": "Algebra", "source": "(Modified) ELMO 2023 Shortlist A3"}{"task_id": "pb-basic-007", "path": "tasks/pb-basic-007", "problem_id": "PB-Basic-007", "level": "basic", "difficulty": "IMO-medium", "category": "Algebra", "source": "(Modified) Taiwan TST 2024, 3J Day2 P6"}{"task_id": "pb-basic-008", "path": "tasks/pb-basic-008", "problem_id": "PB-Basic-008", "level": "basic", "difficulty": "pre-IMO", "category": "Algebra", "source": "(Modified) All-Russia MO 2002."}{"task_id": "pb-basic-009", "path": "tasks/pb-basic-009", "problem_id": "PB-Basic-009", "level": "basic", "difficulty": "IMO-easy", "category": "Combinatorics", "source": "(Modified) ELMO 2013"}{"task_id": "pb-basic-010", "path": "tasks/pb-basic-010", "problem_id": "PB-Basic-010", "level": "basic", "difficulty": "IMO-easy", "category": "Combinatorics", "source": "(Modified) Tournament of Towns, Fall 2022 Senior O-level, P3"}{"task_id": "pb-basic-011", "path": "tasks/pb-basic-011", "problem_id": "PB-Basic-011", "level": "basic", "difficulty": "IMO-easy", "category": "Combinatorics", "source": "(Modified) Vietnam TST 2007 P5"}{"task_id": "pb-basic-012", "path": "tasks/pb-basic-012", "problem_id": "PB-Basic-012", "level": "basic", "difficulty": "IMO-medium", "category": "Combinatorics", "source": "Novel Problem"}{"task_id": "pb-basic-013", "path": "tasks/pb-basic-013", "problem_id": "PB-Basic-013", "level": "basic", "difficulty": "pre-IMO", "category": "Combinatorics", "source": "(Modified) USAMO 2001 P1"}{"task_id": "pb-basic-014", "path": "tasks/pb-basic-014", "problem_id": "PB-Basic-014", "level": "basic", "difficulty": "pre-IMO", "category": "Combinatorics", "source": "(Modified) Balkan MO 1985 P4"}{"task_id": "pb-basic-015", "path": "tasks/pb-basic-015", "problem_id": "PB-Basic-015", "level": "basic", "difficulty": "pre-IMO", "category": "Combinatorics", "source": "(Modified) 2020 USOJMO P1"}{"task_id": "pb-basic-016", "path": "tasks/pb-basic-016", "problem_id": "PB-Basic-016", "level": "basic", "difficulty": "pre-IMO", "category": "Combinatorics", "source": "(Modified) USAMO 1994 Problem 2"}{"task_id": "pb-basic-017", "path": "tasks/pb-basic-017", "problem_id": "PB-Basic-017", "level": "basic", "difficulty": "pre-IMO", "category": "Number theory", "source": "folklore"}{"task_id": "pb-basic-018", "path": "tasks/pb-basic-018", "problem_id": "PB-Basic-018", "level": "basic", "difficulty": "pre-IMO", "category": "Number theory", "source": "(Modified) Polish MO 1965 P4"}{"task_id": "pb-basic-019", "path": "tasks/pb-basic-019", "problem_id": "PB-Basic-019", "level": "basic", "difficulty": "IMO-easy", "category": "Number theory", "source": "(translated) 2003 Korea Winter Program Practice Test"}{"task_id": "pb-basic-020", "path": "tasks/pb-basic-020", "problem_id": "PB-Basic-020", "level": "basic", "difficulty": "IMO-easy", "category": "Number theory", "source": "(Modified) Tuymaada 2013, Seniors, P6"}{"task_id": "pb-basic-021", "path": "tasks/pb-basic-021", "problem_id": "PB-Basic-021", "level": "basic", "difficulty": "IMO-easy", "category": "Number theory", "source": "(Modified) ELMO 2015 P1"}{"task_id": "pb-basic-022", "path": "tasks/pb-basic-022", "problem_id": "PB-Basic-022", "level": "basic", "difficulty": "IMO-easy", "category": "Number theory", "source": "(Modified) ELMO 2023 Shortlist N1"}{"task_id": "pb-basic-023", "path": "tasks/pb-basic-023", "problem_id": "PB-Basic-023", "level": "basic", "difficulty": "IMO-medium", "category": "Number theory", "source": "(Modified) Vietnam TST 2019 P4"}{"task_id": "pb-basic-024", "path": "tasks/pb-basic-024", "problem_id": "PB-Basic-024", "level": "basic", "difficulty": "IMO-medium", "category": "Number theory", "source": "(Modified) Serbia MO 2008, P1"}{"task_id": "pb-basic-025", "path": "tasks/pb-basic-025", "problem_id": "PB-Basic-025", "level": "basic", "difficulty": "IMO-easy", "category": "Geometry", "source": "folklore"}{"task_id": "pb-basic-026", "path": "tasks/pb-basic-026", "problem_id": "PB-Basic-026", "level": "basic", "difficulty": "IMO-medium", "category": "Geometry", "source": "Novel Problem"}{"task_id": "pb-basic-027", "path": "tasks/pb-basic-027", "problem_id": "PB-Basic-027", "level": "basic", "difficulty": "IMO-easy", "category": "Geometry", "source": "(Modified) FKMO 2016 P1"}{"task_id": "pb-basic-028", "path": "tasks/pb-basic-028", "problem_id": "PB-Basic-028", "level": "basic", "difficulty": "IMO-medium", "category": "Geometry", "source": "Novel Problem"}{"task_id": "pb-basic-029", "path": "tasks/pb-basic-029", "problem_id": "PB-Basic-029", "level": "basic", "difficulty": "IMO-medium", "category": "Geometry", "source": "(modified) IMO Shortlist 2008 G5"}{"task_id": "pb-basic-030", "path": "tasks/pb-basic-030", "problem_id": "PB-Basic-030", "level": "basic", "difficulty": "IMO-easy", "category": "Geometry", "source": "Novel Problem"}{"task_id": "pb-advanced-001", "path": "tasks/pb-advanced-001", "problem_id": "PB-Advanced-001", "level": "advanced", "difficulty": "IMO-easy", "category": "Algebra", "source": "Novel Problem"}{"task_id": "pb-advanced-002", "path": "tasks/pb-advanced-002", "problem_id": "PB-Advanced-002", "level": "advanced", "difficulty": "IMO-medium", "category": "Combinatorics", "source": "Novel Problem"}{"task_id": "pb-advanced-003", "path": "tasks/pb-advanced-003", "problem_id": "PB-Advanced-003", "level": "advanced", "difficulty": "IMO-hard", "category": "Geometry", "source": "Novel Problem"}{"task_id": "pb-advanced-004", "path": "tasks/pb-advanced-004", "problem_id": "PB-Advanced-004", "level": "advanced", "difficulty": "IMO-easy", "category": "Combinatorics", "source": "Novel Problem"}{"task_id": "pb-advanced-005", "path": "tasks/pb-advanced-005", "problem_id": "PB-Advanced-005", "level": "advanced", "difficulty": "IMO-medium", "category": "Geometry", "source": "Novel Problem"}{"task_id": "pb-advanced-006", "path": "tasks/pb-advanced-006", "problem_id": "PB-Advanced-006", "level": "advanced", "difficulty": "IMO-hard", "category": "Algebra", "source": "Novel Problem"}{"task_id": "pb-advanced-007", "path": "tasks/pb-advanced-007", "problem_id": "PB-Advanced-007", "level": "advanced", "difficulty": "IMO-easy", "category": "Algebra", "source": "Novel Problem"}{"task_id": "pb-advanced-008", "path": "tasks/pb-advanced-008", "problem_id": "PB-Advanced-008", "level": "advanced", "difficulty": "IMO-medium", "category": "Number theory", "source": "Novel Problem"}{"task_id": "pb-advanced-009", "path": "tasks/pb-advanced-009", "problem_id": "PB-Advanced-009", "level": "advanced", "difficulty": "IMO-hard", "category": "Geometry", "source": "Novel Problem"}{"task_id": "pb-advanced-010", "path": "tasks/pb-advanced-010", "problem_id": "PB-Advanced-010", "level": "advanced", "difficulty": "IMO-medium", "category": "Geometry", "source": "Novel Problem"}{"task_id": "pb-advanced-011", "path": "tasks/pb-advanced-011", "problem_id": "PB-Advanced-011", "level": "advanced", "difficulty": "IMO-medium", "category": "Algebra", "source": "Novel Problem"}{"task_id": "pb-advanced-012", "path": "tasks/pb-advanced-012", "problem_id": "PB-Advanced-012", "level": "advanced", "difficulty": "IMO-hard", "category": "Number theory", "source": "Novel Problem"}{"task_id": "pb-advanced-013", "path": "tasks/pb-advanced-013", "problem_id": "PB-Advanced-013", "level": "advanced", "difficulty": "IMO-easy", "category": "Algebra", "source": "Novel Problem"}{"task_id": "pb-advanced-014", "path": "tasks/pb-advanced-014", "problem_id": "PB-Advanced-014", "level": "advanced", "difficulty": "IMO-medium", "category": "Combinatorics", "source": "Novel Problem"}{"task_id": "pb-advanced-015", "path": "tasks/pb-advanced-015", "problem_id": "PB-Advanced-015", "level": "advanced", "difficulty": "IMO-hard", "category": "Geometry", "source": "Novel Problem"}{"task_id": "pb-advanced-016", "path": "tasks/pb-advanced-016", "problem_id": "PB-Advanced-016", "level": "advanced", "difficulty": "IMO-easy", "category": "Geometry", "source": "Novel Problem"}{"task_id": "pb-advanced-017", "path": "tasks/pb-advanced-017", "problem_id": "PB-Advanced-017", "level": "advanced", "difficulty": "IMO-easy", "category": "Number theory", "source": "Novel Problem"}{"task_id": "pb-advanced-018", "path": "tasks/pb-advanced-018", "problem_id": "PB-Advanced-018", "level": "advanced", "difficulty": "IMO-hard", "category": "Combinatorics", "source": "Novel Problem"}{"task_id": "pb-advanced-019", "path": "tasks/pb-advanced-019", "problem_id": "PB-Advanced-019", "level": "advanced", "difficulty": "IMO-easy", "category": "Algebra", "source": "(Modified) IMO 2024 P1"}{"task_id": "pb-advanced-020", "path": "tasks/pb-advanced-020", "problem_id": "PB-Advanced-020", "level": "advanced", "difficulty": "IMO-medium", "category": "Number theory", "source": "(Modified) IMO 2024 P2"}{"task_id": "pb-advanced-021", "path": "tasks/pb-advanced-021", "problem_id": "PB-Advanced-021", "level": "advanced", "difficulty": "IMO-hard", "category": "Combinatorics", "source": "(Modified) IMO 2024 P3"}{"task_id": "pb-advanced-022", "path": "tasks/pb-advanced-022", "problem_id": "PB-Advanced-022", "level": "advanced", "difficulty": "IMO-easy", "category": "Geometry", "source": "(Modified) IMO 2024 P4"}{"task_id": "pb-advanced-023", "path": "tasks/pb-advanced-023", "problem_id": "PB-Advanced-023", "level": "advanced", "difficulty": "IMO-medium", "category": "Combinatorics", "source": "(Modified) IMO 2024 P5"}{"task_id": "pb-advanced-024", "path": "tasks/pb-advanced-024", "problem_id": "PB-Advanced-024", "level": "advanced", "difficulty": "IMO-hard", "category": "Algebra", "source": "(Modified) IMO 2024 P6"}{"task_id": "pb-advanced-025", "path": "tasks/pb-advanced-025", "problem_id": "PB-Advanced-025", "level": "advanced", "difficulty": "IMO-easy", "category": "Number theory", "source": "USAMO 2025"}{"task_id": "pb-advanced-026", "path": "tasks/pb-advanced-026", "problem_id": "PB-Advanced-026", "level": "advanced", "difficulty": "IMO-medium", "category": "Algebra", "source": "USAMO 2025"}{"task_id": "pb-advanced-027", "path": "tasks/pb-advanced-027", "problem_id": "PB-Advanced-027", "level": "advanced", "difficulty": "IMO-hard", "category": "Combinatorics", "source": "USAMO 2025"}{"task_id": "pb-advanced-028", "path": "tasks/pb-advanced-028", "problem_id": "PB-Advanced-028", "level": "advanced", "difficulty": "IMO-easy", "category": "Geometry", "source": "USAMO 2025"}{"task_id": "pb-advanced-029", "path": "tasks/pb-advanced-029", "problem_id": "PB-Advanced-029", "level": "advanced", "difficulty": "IMO-medium", "category": "Number theory", "source": "USAMO 2025"}{"task_id": "pb-advanced-030", "path": "tasks/pb-advanced-030", "problem_id": "PB-Advanced-030", "level": "advanced", "difficulty": "IMO-hard", "category": "Combinatorics", "source": "USAMO 2025"}123456789101112131415161718192021222324252627282930{"task_id": "pb-basic-001", "path": "tasks/pb-basic-001", "problem_id": "PB-Basic-001", "level": "basic", "difficulty": "IMO-easy", "category": "Algebra", "source": "(Modified) IMO 2019, P1"}{"task_id": "pb-basic-002", "path": "tasks/pb-basic-002", "problem_id": "PB-Basic-002", "level": "basic", "difficulty": "pre-IMO", "category": "Algebra", "source": "(Modified) All-Russian MO 2013, Grade 11, P6"}{"task_id": "pb-basic-003", "path": "tasks/pb-basic-003", "problem_id": "PB-Basic-003", "level": "basic", "difficulty": "IMO-easy", "category": "Algebra", "source": "(Modified) Balkan MO 2023, P1"}{"task_id": "pb-basic-004", "path": "tasks/pb-basic-004", "problem_id": "PB-Basic-004", "level": "basic", "difficulty": "IMO-easy", "category": "Algebra", "source": "(Modified) VMO 2012, Day2 P3"}{"task_id": "pb-basic-005", "path": "tasks/pb-basic-005", "problem_id": "PB-Basic-005", "level": "basic", "difficulty": "IMO-easy", "category": "Algebra", "source": "(Modified) ELMO 2023 Shortlist A1"}{"task_id": "pb-basic-006", "path": "tasks/pb-basic-006", "problem_id": "PB-Basic-006", "level": "basic", "difficulty": "IMO-medium", "category": "Algebra", "source": "(Modified) ELMO 2023 Shortlist A3"}{"task_id": "pb-basic-007", "path": "tasks/pb-basic-007", "problem_id": "PB-Basic-007", "level": "basic", "difficulty": "IMO-medium", "category": "Algebra", "source": "(Modified) Taiwan TST 2024, 3J Day2 P6"}{"task_id": "pb-basic-008", "path": "tasks/pb-basic-008", "problem_id": "PB-Basic-008", "level": "basic", "difficulty": "pre-IMO", "category": "Algebra", "source": "(Modified) All-Russia MO 2002."}{"task_id": "pb-basic-009", "path": "tasks/pb-basic-009", "problem_id": "PB-Basic-009", "level": "basic", "difficulty": "IMO-easy", "category": "Combinatorics", "source": "(Modified) ELMO 2013"}{"task_id": "pb-basic-010", "path": "tasks/pb-basic-010", "problem_id": "PB-Basic-010", "level": "basic", "difficulty": "IMO-easy", "category": "Combinatorics", "source": "(Modified) Tournament of Towns, Fall 2022 Senior O-level, P3"}{"task_id": "pb-basic-011", "path": "tasks/pb-basic-011", "problem_id": "PB-Basic-011", "level": "basic", "difficulty": "IMO-easy", "category": "Combinatorics", "source": "(Modified) Vietnam TST 2007 P5"}{"task_id": "pb-basic-012", "path": "tasks/pb-basic-012", "problem_id": "PB-Basic-012", "level": "basic", "difficulty": "IMO-medium", "category": "Combinatorics", "source": "Novel Problem"}{"task_id": "pb-basic-013", "path": "tasks/pb-basic-013", "problem_id": "PB-Basic-013", "level": "basic", "difficulty": "pre-IMO", "category": "Combinatorics", "source": "(Modified) USAMO 2001 P1"}{"task_id": "pb-basic-014", "path": "tasks/pb-basic-014", "problem_id": "PB-Basic-014", "level": "basic", "difficulty": "pre-IMO", "category": "Combinatorics", "source": "(Modified) Balkan MO 1985 P4"}{"task_id": "pb-basic-015", "path": "tasks/pb-basic-015", "problem_id": "PB-Basic-015", "level": "basic", "difficulty": "pre-IMO", "category": "Combinatorics", "source": "(Modified) 2020 USOJMO P1"}{"task_id": "pb-basic-016", "path": "tasks/pb-basic-016", "problem_id": "PB-Basic-016", "level": "basic", "difficulty": "pre-IMO", "category": "Combinatorics", "source": "(Modified) USAMO 1994 Problem 2"}{"task_id": "pb-basic-017", "path": "tasks/pb-basic-017", "problem_id": "PB-Basic-017", "level": "basic", "difficulty": "pre-IMO", "category": "Number theory", "source": "folklore"}{"task_id": "pb-basic-018", "path": "tasks/pb-basic-018", "problem_id": "PB-Basic-018", "level": "basic", "difficulty": "pre-IMO", "category": "Number theory", "source": "(Modified) Polish MO 1965 P4"}{"task_id": "pb-basic-019", "path": "tasks/pb-basic-019", "problem_id": "PB-Basic-019", "level": "basic", "difficulty": "IMO-easy", "category": "Number theory", "source": "(translated) 2003 Korea Winter Program Practice Test"}{"task_id": "pb-basic-020", "path": "tasks/pb-basic-020", "problem_id": "PB-Basic-020", "level": "basic", "difficulty": "IMO-easy", "category": "Number theory", "source": "(Modified) Tuymaada 2013, Seniors, P6"}{"task_id": "pb-basic-021", "path": "tasks/pb-basic-021", "problem_id": "PB-Basic-021", "level": "basic", "difficulty": "IMO-easy", "category": "Number theory", "source": "(Modified) ELMO 2015 P1"}{"task_id": "pb-basic-022", "path": "tasks/pb-basic-022", "problem_id": "PB-Basic-022", "level": "basic", "difficulty": "IMO-easy", "category": "Number theory", "source": "(Modified) ELMO 2023 Shortlist N1"}{"task_id": "pb-basic-023", "path": "tasks/pb-basic-023", "problem_id": "PB-Basic-023", "level": "basic", "difficulty": "IMO-medium", "category": "Number theory", "source": "(Modified) Vietnam TST 2019 P4"}{"task_id": "pb-basic-024", "path": "tasks/pb-basic-024", "problem_id": "PB-Basic-024", "level": "basic", "difficulty": "IMO-medium", "category": "Number theory", "source": "(Modified) Serbia MO 2008, P1"}{"task_id": "pb-basic-025", "path": "tasks/pb-basic-025", "problem_id": "PB-Basic-025", "level": "basic", "difficulty": "IMO-easy", "category": "Geometry", "source": "folklore"}{"task_id": "pb-basic-026", "path": "tasks/pb-basic-026", "problem_id": "PB-Basic-026", "level": "basic", "difficulty": "IMO-medium", "category": "Geometry", "source": "Novel Problem"}{"task_id": "pb-basic-027", "path": "tasks/pb-basic-027", "problem_id": "PB-Basic-027", "level": "basic", "difficulty": "IMO-easy", "category": "Geometry", "source": "(Modified) FKMO 2016 P1"}{"task_id": "pb-basic-028", "path": "tasks/pb-basic-028", "problem_id": "PB-Basic-028", "level": "basic", "difficulty": "IMO-medium", "category": "Geometry", "source": "Novel Problem"}{"task_id": "pb-basic-029", "path": "tasks/pb-basic-029", "problem_id": "PB-Basic-029", "level": "basic", "difficulty": "IMO-medium", "category": "Geometry", "source": "(modified) IMO Shortlist 2008 G5"}{"task_id": "pb-basic-030", "path": "tasks/pb-basic-030", "problem_id": "PB-Basic-030", "level": "basic", "difficulty": "IMO-easy", "category": "Geometry", "source": "Novel Problem"}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546{ "schema_version": "1.0", "task_count": 60, "tasks": [ { "task_id": "pb-basic-001", "path": "tasks/pb-basic-001", "problem_id": "PB-Basic-001", "level": "basic", "difficulty": "IMO-easy", "category": "Algebra", "source": "(Modified) IMO 2019, P1" }, { "task_id": "pb-basic-002", "path": "tasks/pb-basic-002", "problem_id": "PB-Basic-002", "level": "basic", "difficulty": "pre-IMO", "category": "Algebra", "source": "(Modified) All-Russian MO 2013, Grade 11, P6" }, { "task_id": "pb-basic-003", "path": "tasks/pb-basic-003", "problem_id": "PB-Basic-003", "level": "basic", "difficulty": "IMO-easy", "category": "Algebra", "source": "(Modified) Balkan MO 2023, P1" }, { "task_id": "pb-basic-004", "path": "tasks/pb-basic-004", "problem_id": "PB-Basic-004", "level": "basic", "difficulty": "IMO-easy", "category": "Algebra", "source": "(Modified) VMO 2012, Day2 P3" }, { "task_id": "pb-basic-005", "path": "tasks/pb-basic-005", "problem_id": "PB-Basic-005", "level": "basic", "difficulty": "IMO-easy", "category": "Algebra", "source": "(Modified) ELMO 2023 Shortlist A1" }, { "task_id": "pb-basic-006", "path": "tasks/pb-basic-006", "problem_id": "PB-Basic-006", "level": "basic", "difficulty": "IMO-medium", "category": "Algebra", "source": "(Modified) ELMO 2023 Shortlist A3" }, { "task_id": "pb-basic-007", "path": "tasks/pb-basic-007", "problem_id": "PB-Basic-007", "level": "basic", "difficulty": "IMO-medium", "category": "Algebra", "source": "(Modified) Taiwan TST 2024, 3J Day2 P6" }, { "task_id": "pb-basic-008", "path": "tasks/pb-basic-008", "problem_id": "PB-Basic-008", "level": "basic", "difficulty": "pre-IMO", "category": "Algebra", "source": "(Modified) All-Russia MO 2002." }, { "task_id": "pb-basic-009", "path": "tasks/pb-basic-009", "problem_id": "PB-Basic-009", "level": "basic", "difficulty": "IMO-easy", "category": "Combinatorics", "source": "(Modified) ELMO 2013" }, { "task_id": "pb-basic-010", "path": "tasks/pb-basic-010", "problem_id": "PB-Basic-010", "level": "basic", "difficulty": "IMO-easy", "category": "Combinatorics", "source": "(Modified) Tournament of Towns, Fall 2022 Senior O-level, P3" }, { "task_id": "pb-basic-011", "path": "tasks/pb-basic-011", "problem_id": "PB-Basic-011", "level": "basic", "difficulty": "IMO-easy", "category": "Combinatorics", "source": "(Modified) Vietnam TST 2007 P5" }, { "task_id": "pb-basic-012", "path": "tasks/pb-basic-012", "problem_id": "PB-Basic-012", "level": "basic", "difficulty": "IMO-medium", "category": "Combinatorics", "source": "Novel Problem" }, { "task_id": "pb-basic-013", "path": "tasks/pb-basic-013", "problem_id": "PB-Basic-013", "level": "basic", "difficulty": "pre-IMO", "category": "Combinatorics", "source": "(Modified) USAMO 2001 P1" }, { "task_id": "pb-basic-014", "path": "tasks/pb-basic-014", "problem_id": "PB-Basic-014", "level": "basic", "difficulty": "pre-IMO", "category": "Combinatorics", "source": "(Modified) Balkan MO 1985 P4" }, { "task_id": "pb-basic-015", "path": "tasks/pb-basic-015", "problem_id": "PB-Basic-015", "level": "basic", "difficulty": "pre-IMO", "category": "Combinatorics", "source": "(Modified) 2020 USOJMO P1" }, { "task_id": "pb-basic-016", "path": "tasks/pb-basic-016", "problem_id": "PB-Basic-016", "level": "basic", "difficulty": "pre-IMO", "category": "Combinatorics", "source": "(Modified) USAMO 1994 Problem 2" }, { "task_id": "pb-basic-017", "path": "tasks/pb-basic-017", "problem_id": "PB-Basic-017", "level": "basic", "difficulty": "pre-IMO", "category": "Number theory", "source": "folklore" }, { "task_id": "pb-basic-018", "path": "tasks/pb-basic-018", "problem_id": "PB-Basic-018", "level": "basic", "difficulty": "pre-IMO", "category": "Number theory", "source": "(Modified) Polish MO 1965 P4" }, { "task_id": "pb-basic-019", "path": "tasks/pb-basic-019", "problem_id": "PB-Basic-019", "level": "basic", "difficulty": "IMO-easy", "category": "Number theory", "source": "(translated) 2003 Korea Winter Program Practice Test" }, { "task_id": "pb-basic-020", "path": "tasks/pb-basic-020", "problem_id": "PB-Basic-020", "level": "basic", "difficulty": "IMO-easy", "category": "Number theory", "source": "(Modified) Tuymaada 2013, Seniors, P6" }, { "task_id": "pb-basic-021", "path": "tasks/pb-basic-021", "problem_id": "PB-Basic-021", "level": "basic", "difficulty": "IMO-easy", "category": "Number theory", "source": "(Modified) ELMO 2015 P1" }, { "task_id": "pb-basic-022", "path": "tasks/pb-basic-022", "problem_id": "PB-Basic-022", "level": "basic", "difficulty": "IMO-easy", "category": "Number theory", "source": "(Modified) ELMO 2023 Shortlist N1" }, { "task_id": "pb-basic-023", "path": "tasks/pb-basic-023", "problem_id": "PB-Basic-023", "level": "basic", "difficulty": "IMO-medium", "category": "Number theory", "source": "(Modified) Vietnam TST 2019 P4" }, { "task_id": "pb-basic-024", "path": "tasks/pb-basic-024", "problem_id": "PB-Basic-024", "level": "basic", "difficulty": "IMO-medium", "category": "Number theory", "source": "(Modified) Serbia MO 2008, P1" }, { "task_id": "pb-basic-025", "path": "tasks/pb-basic-025", "problem_id": "PB-Basic-025", "level": "basic", "difficulty": "IMO-easy", "category": "Geometry", "source": "folklore" }, { "task_id": "pb-basic-026", "path": "tasks/pb-basic-026", "problem_id": "PB-Basic-026", "level": "basic", "difficulty": "IMO-medium", "category": "Geometry", "source": "Novel Problem" }, { "task_id": "pb-basic-027", "path": "tasks/pb-basic-027", "problem_id": "PB-Basic-027", "level": "basic", "difficulty": "IMO-easy", "category": "Geometry", "source": "(Modified) FKMO 2016 P1" }, { "task_id": "pb-basic-028", "path": "tasks/pb-basic-028", "problem_id": "PB-Basic-028", "level": "basic", "difficulty": "IMO-medium", "category": "Geometry", "source": "Novel Problem" }, { "task_id": "pb-basic-029", "path": "tasks/pb-basic-029", "problem_id": "PB-Basic-029", "level": "basic", "difficulty": "IMO-medium", "category": "Geometry", "source": "(modified) IMO Shortlist 2008 G5" }, { "task_id": "pb-basic-030", "path": "tasks/pb-basic-030", "problem_id": "PB-Basic-030", "level": "basic", "difficulty": "IMO-easy", "category": "Geometry", "source": "Novel Problem" }, { "task_id": "pb-advanced-001", "path": "tasks/pb-advanced-001", "problem_id": "PB-Advanced-001", "level": "advanced", "difficulty": "IMO-easy", "category": "Algebra", "source": "Novel Problem" }, { "task_id": "pb-advanced-002", "path": "tasks/pb-advanced-002", "problem_id": "PB-Advanced-002", "level": "advanced", "difficulty": "IMO-medium", "category": "Combinatorics", "source": "Novel Problem" }, { "task_id": "pb-advanced-003", "path": "tasks/pb-advanced-003", "problem_id": "PB-Advanced-003", "level": "advanced", "difficulty": "IMO-hard", "category": "Geometry", "source": "Novel Problem" }, { "task_id": "pb-advanced-004", "path": "tasks/pb-advanced-004", "problem_id": "PB-Advanced-004", "level": "advanced", "difficulty": "IMO-easy", "category": "Combinatorics", "source": "Novel Problem" }, { "task_id": "pb-advanced-005", "path": "tasks/pb-advanced-005", "problem_id": "PB-Advanced-005", "level": "advanced", "difficulty": "IMO-medium", "category": "Geometry", "source": "Novel Problem" }, { "task_id": "pb-advanced-006", "path": "tasks/pb-advanced-006", "problem_id": "PB-Advanced-006", "level": "advanced", "difficulty": "IMO-hard", "category": "Algebra", "source": "Novel Problem" }, { "task_id": "pb-advanced-007", "path": "tasks/pb-advanced-007", "problem_id": "PB-Advanced-007", "level": "advanced", "difficulty": "IMO-easy", "category": "Algebra", "source": "Novel Problem" }, { "task_id": "pb-advanced-008", "path": "tasks/pb-advanced-008", "problem_id": "PB-Advanced-008", "level": "advanced", "difficulty": "IMO-medium", "category": "Number theory", "source": "Novel Problem" }, { "task_id": "pb-advanced-009", "path": "tasks/pb-advanced-009", "problem_id": "PB-Advanced-009", "level": "advanced", "difficulty": "IMO-hard", "category": "Geometry", "source": "Novel Problem" }, { "task_id": "pb-advanced-010", "path": "tasks/pb-advanced-010", "problem_id": "PB-Advanced-010", "level": "advanced", "difficulty": "IMO-medium", "category": "Geometry", "source": "Novel Problem" }, { "task_id": "pb-advanced-011", "path": "tasks/pb-advanced-011", "problem_id": "PB-Advanced-011", "level": "advanced", "difficulty": "IMO-medium", "category": "Algebra", "source": "Novel Problem" }, { "task_id": "pb-advanced-012", "path": "tasks/pb-advanced-012", "problem_id": "PB-Advanced-012", "level": "advanced", "difficulty": "IMO-hard", "category": "Number theory", "source": "Novel Problem" }, { "task_id": "pb-advanced-013", "path": "tasks/pb-advanced-013", "problem_id": "PB-Advanced-013", "level": "advanced", "difficulty": "IMO-easy", "category": "Algebra", "source": "Novel Problem" }, { "task_id": "pb-advanced-014", "path": "tasks/pb-advanced-014", "problem_id": "PB-Advanced-014", "level": "advanced", "difficulty": "IMO-medium", "category": "Combinatorics", "source": "Novel Problem" }, { "task_id": "pb-advanced-015", "path": "tasks/pb-advanced-015", "problem_id": "PB-Advanced-015", "level": "advanced", "difficulty": "IMO-hard", "category": "Geometry", "source": "Novel Problem" }, { "task_id": "pb-advanced-016", "path": "tasks/pb-advanced-016", "problem_id": "PB-Advanced-016", "level": "advanced", "difficulty": "IMO-easy", "category": "Geometry", "source": "Novel Problem" }, { "task_id": "pb-advanced-017", "path": "tasks/pb-advanced-017", "problem_id": "PB-Advanced-017", "level": "advanced", "difficulty": "IMO-easy", "category": "Number theory", "source": "Novel Problem" }, { "task_id": "pb-advanced-018", "path": "tasks/pb-advanced-018", "problem_id": "PB-Advanced-018", "level": "advanced", "difficulty": "IMO-hard", "category": "Combinatorics", "source": "Novel Problem" }, { "task_id": "pb-advanced-019", "path": "tasks/pb-advanced-019", "problem_id": "PB-Advanced-019", "level": "advanced", "difficulty": "IMO-easy", "category": "Algebra", "source": "(Modified) IMO 2024 P1" }, { "task_id": "pb-advanced-020", "path": "tasks/pb-advanced-020", "problem_id": "PB-Advanced-020", "level": "advanced", "difficulty": "IMO-medium", "category": "Number theory", "source": "(Modified) IMO 2024 P2" }, { "task_id": "pb-advanced-021", "path": "tasks/pb-advanced-021", "problem_id": "PB-Advanced-021", "level": "advanced", "difficulty": "IMO-hard", "category": "Combinatorics", "source": "(Modified) IMO 2024 P3" }, { "task_id": "pb-advanced-022", "path": "tasks/pb-advanced-022", "problem_id": "PB-Advanced-022", "level": "advanced", "difficulty": "IMO-easy", "category": "Geometry", "source": "(Modified) IMO 2024 P4" }, { "task_id": "pb-advanced-023", "path": "tasks/pb-advanced-023", "problem_id": "PB-Advanced-023", "level": "advanced", "difficulty": "IMO-medium", "category": "Combinatorics", "source": "(Modified) IMO 2024 P5" }, { "task_id": "pb-advanced-024", "path": "tasks/pb-advanced-024", "problem_id": "PB-Advanced-024", "level": "advanced", "difficulty": "IMO-hard", "category": "Algebra", "source": "(Modified) IMO 2024 P6" }, { "task_id": "pb-advanced-025", "path": "tasks/pb-advanced-025", "problem_id": "PB-Advanced-025", "level": "advanced", "difficulty": "IMO-easy", "category": "Number theory", "source": "USAMO 2025" }, { "task_id": "pb-advanced-026", "path": "tasks/pb-advanced-026", "problem_id": "PB-Advanced-026", "level": "advanced", "difficulty": "IMO-medium", "category": "Algebra", "source": "USAMO 2025" }, { "task_id": "pb-advanced-027", "path": "tasks/pb-advanced-027", "problem_id": "PB-Advanced-027", "level": "advanced", "difficulty": "IMO-hard", "category": "Combinatorics", "source": "USAMO 2025" }, { "task_id": "pb-advanced-028", "path": "tasks/pb-advanced-028", "problem_id": "PB-Advanced-028", "level": "advanced", "difficulty": "IMO-easy", "category": "Geometry", "source": "USAMO 2025" }, { "task_id": "pb-advanced-029", "path": "tasks/pb-advanced-029", "problem_id": "PB-Advanced-029", "level": "advanced", "difficulty": "IMO-medium", "category": "Number theory", "source": "USAMO 2025" }, { "task_id": "pb-advanced-030", "path": "tasks/pb-advanced-030", "problem_id": "PB-Advanced-030", "level": "advanced", "difficulty": "IMO-hard", "category": "Combinatorics", "source": "USAMO 2025" } ]}1234567# PB-Advanced-001
Solve the following problem using your own reasoning and local tools. Do not use web lookups or external models. Write a complete, self-contained, rigorous mathematical proof to `/app/proof.md`; create `/app` if necessary.
## Problem
For a positive integer $n$, let $A_{n}$ be the number of perfect powers less than or equal to $n$. Here, a perfect power is a number that can be expressed in the form $a^{b}$, where $a$ is a positive integer and $b$ is an integer greater than or equal to 2. Prove that there are infinitely many $n$ such that $A_{n}$ divides $n+2024$.1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889#!/bin/shset -euPROOF=${PROOF:-/app/proof.md}mkdir -p "$(dirname -- "$PROOF")"cat > "$PROOF" <<'IMO_PROOF_c5a67279aaf3a012ed4c4637fbb1a168892e723639ab733188bad1492b6ee946'Let's look at the following lemma using the intermediate value property.
<Lemma 1> If a sequence of non-negative integers $\left(x_{n}\right)_{n=1}^{\infty}$ satisfies $x_{n+1}-x_{n} \in\{0,1\}$ and for any $M>0$, there exists a positive integer $n$ such that $\frac{n}{x_{n}}>M$, then there are infinitely many $n$ such that $\frac{n}{x_{n}}$ is a positive integer.
<Proof of Lemma 1> First, let $k_{0}$ be the smallest $k$ such that $x_{k} \geq 1$. Now, we will prove that for any integer $m \geq k_{0}$, there exists an $n$ such that $\frac{n}{x_{n}}=m$.
(1) There exists a positive integer $n$ such that $\frac{n}{x_{n}}>m$, and let $n_{0}$ be the smallest such $n$. Since $\frac{k_{0}}{x_{k_{0}}} \leq k_{0}$, we have $n_{0} \geq k_{0}+1$.
(2) By the minimality of $n_{0}$ and $n_{0} \geq k_{0}+1$, we have $\frac{n_{0}-1}{x_{n_{0}-1}} \leq m$. If $\frac{n_{0}-1}{x_{n_{0}-1}}<m$, then
\[ n_{0}<m x_{n_{0}-1}+1 \quad \Rightarrow \quad n_{0} \leq m x_{n_{0}-1}. \]
However, from $\frac{n_{0}}{x_{n_{0}}}>m$, we have $m x_{n_{0}}<n_{0}$, so combining the two results gives
\[ m x_{n_{0}-1} \geq n_{0}>m x_{n_{0}}, \]
which leads to $x_{n_{0}-1}>x_{n_{0}}$. This contradicts the condition of the problem that $x_{n+1}-x_{n} \in\{0,1\}$. Therefore, we must have $\frac{n_{0}-1}{x_{n_{0}-1}}=m$, and the proof is complete.
Therefore, for any integer $m \geq k_{0}$, there exists an $n$ such that $\frac{n}{x_{n}}=m$, and it is obvious that these values of $n$ are different for different $m$, so the proof is complete. \qed
The following lemma is a Bernoulli-type inequality.
<Lemma 2> For any integer $k \geq 2$, we have $2^{k} \geq \frac{k^{2}}{2}$.
<Proof of Lemma 2> Since $k \geq 2$, by the binomial theorem, we have
\[ 2^{k} \geq 1+k+\binom{k}{2}=1+\frac{k}{2}+\frac{k^{2}}{2}>\frac{k^{2}-k}{2}, \]
so the proof is complete. $\qed$
Now, let's prove the main problem.
<Step 1> Finding an upper bound for $A_{n}$
<Step 1.1> For a positive integer $a$ and $k \geq 2$, let a number of the form $a^{k}$ be called a $k$-th power. Then, for any $k$-th power $a^{k}$ to be less than or equal to $n$, we must have
\[ a^{k} \leq n \quad \Rightarrow \quad a \leq n^{\frac{1}{k}}, \]
so the number of $k$-th powers less than or equal to $n$ is less than or equal to $n^{\frac{1}{k}}$.
<Step 1.2> If any $k$-th power other than 1 is less than or equal to $n$, then we must have $2^{k} \leq n$, so $k \leq \log _{2} n$.
<Step 1.3> By (1) and (2) above, $A_{n}$ satisfies the following:
\[ A_{n} \leq \sum_{k=2}^{\left[\log _{2} n\right]} n^{\frac{1}{k}} \leq\left(\left[\log _{2} n\right]-1\right) n^{\frac{1}{2}}<\log _{2} n \cdot n^{\frac{1}{2}}. \]
<Step 2> Solving the problem using the lemma
Now, let the sequence $\left(x_{n}\right)_{n=1}^{\infty}$ be defined as $x_{n}=0$ if $n \leq 2024$ and $x_{n}=A_{n-2024}$ for $n \geq 2025$.
<Step 2.1> Since $A_{1}=1$ and $A_{n+1}-A_{n}$ is 1 if $n+1$ is a perfect power and 0 otherwise, $x_{n}$ satisfies $x_{n+1}-x_{n} \in\{0,1\}$ for any $n \geq 1$.
<Step 2.2> By <Step 1>, we have $A_{2^{2 k}} \leq 2 k \cdot 2^{k}$, so by <Lemma 2>, we have
\[ \frac{2^{2 k}}{A_{2^{2 k}}} \geq \frac{2^{k}}{2 k} \geq \frac{k}{4}. \]
Since $A_{n}$ is an increasing sequence, we have $A_{n} \geq x_{n}$, so $\frac{n}{x_{n}} \geq \frac{n}{A_{n}}$. Combining these results gives
\[ \frac{2^{2 k}}{x_{2^{2 k}}} \geq \frac{2^{2 k}}{A_{2^{2 k}}} \geq \frac{k}{4}, \]
so for any $M>0$, there exists an $n$ such that $\frac{n}{x_{n}}>M$.
<Step 2.3> By (1), (2), and <Lemma 1> above, there are infinitely many $n$ such that $x_{n} \mid n$. Therefore, there are also infinitely many $n$ such that
\[ \frac{n+2024}{A_{n}}=\frac{n+2024}{x_{n+2024}} \]
is a positive integer.IMO_PROOF_c5a67279aaf3a012ed4c4637fbb1a168892e723639ab733188bad1492b6ee9461234567891011121314151617181920schema_version = "1.4"artifacts = ["/app/proof.md"][task]name = "imo-proofbench/pb-advanced-001"version = "1.0.0"description = "IMO-ProofBench mathematical proof task"keywords = ["math", "proof", "imo"][metadata]problem_id = "PB-Advanced-001"level = "advanced"[agent]network_mode = "allowlist"timeout_sec = 3600[environment]docker_image = "docker.io/library/python:3.12-slim"cpus = 1memory_mb = 2048[verifier]network_mode = "allowlist"timeout_sec = 18012345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758"""Offline structural validation only; external rubric judge assigns 0–7 points."""import json, os, statLIMIT = 200_000
def read_own(path): """Reject links, special files, multiple hard links, and oversized files.""" parts = os.path.abspath(path).split('/')[1:] folder = os.open('/', os.O_RDONLY | os.O_DIRECTORY) try: for part in parts[:-1]: inner = os.open(part, os.O_RDONLY | os.O_DIRECTORY | os.O_NOFOLLOW, dir_fd=folder) os.close(folder) folder = inner fd = os.open(parts[-1], os.O_RDONLY | os.O_NOFOLLOW | os.O_NONBLOCK, dir_fd=folder) finally: os.close(folder) with os.fdopen(fd, 'rb') as stream: info = os.fstat(stream.fileno()) if not stat.S_ISREG(info.st_mode) or info.st_nlink != 1: raise ValueError('not a regular file with one link') data = stream.read(LIMIT + 1) if len(data) > LIMIT: raise ValueError('file exceeds 200000 bytes') return data
def write_new(path, data): try: os.unlink(path) except FileNotFoundError: pass fd = os.open(path, os.O_WRONLY | os.O_CREAT | os.O_EXCL | os.O_NOFOLLOW, 0o644) with os.fdopen(fd, 'wb') as f: f.write(data)
def main(): out = os.environ['VERIFIER_DIR'] os.makedirs(out, exist_ok=True) write_new(os.path.join(out, 'reward.txt'), b'0\n') proof_path = os.path.join(out, 'proof.md') try: os.unlink(proof_path) except FileNotFoundError: pass reference = open(os.path.join(os.environ['TESTS_DIR'], 'reference.json'), 'rb').read() json.loads(reference) write_new(os.path.join(out, 'reference.json'), reference) status, count, reason = 'missing', 0, 'proof unavailable or invalid' try: raw = read_own(os.environ['PROOF']) proof = raw.decode('utf-8', 'strict') count = len(proof) write_new(proof_path, raw) if sum(not c.isspace() for c in proof) < 20: status, reason = 'empty', 'fewer than 20 non-whitespace characters' else: status, reason = 'submitted_for_judge', 'structurally valid submission' except (OSError, ValueError, UnicodeError) as e: reason = 'proof unavailable or invalid: ' + str(e)[:200] result = {'status': status, 'char_count': count, 'requires_llm_judge': True, 'max_score': 7, 'reason': reason} write_new(os.path.join(out, 'grade.json'), (json.dumps(result, ensure_ascii=False, indent=2)+'\n').encode()) if status == 'submitted_for_judge': write_new(os.path.join(out, 'reward.txt'), b'1\n') print(status, 'structural reward:', int(status == 'submitted_for_judge'))if __name__ == '__main__': main()123456789101112{ "problem": "For a positive integer $n$, let $A_{n}$ be the number of perfect powers less than or equal to $n$. Here, a perfect power is a number that can be expressed in the form $a^{b}$, where $a$ is a positive integer and $b$ is an integer greater than or equal to 2. Prove that there are infinitely many $n$ such that $A_{n}$ divides $n+2024$.", "solution": "Let's look at the following lemma using the intermediate value property.\n\n <Lemma 1> If a sequence of non-negative integers $\\left(x_{n}\\right)_{n=1}^{\\infty}$ satisfies $x_{n+1}-x_{n} \\in\\{0,1\\}$ and for any $M>0$, there exists a positive integer $n$ such that $\\frac{n}{x_{n}}>M$, then there are infinitely many $n$ such that $\\frac{n}{x_{n}}$ is a positive integer.\n\n <Proof of Lemma 1> First, let $k_{0}$ be the smallest $k$ such that $x_{k} \\geq 1$. Now, we will prove that for any integer $m \\geq k_{0}$, there exists an $n$ such that $\\frac{n}{x_{n}}=m$.\n\n (1) There exists a positive integer $n$ such that $\\frac{n}{x_{n}}>m$, and let $n_{0}$ be the smallest such $n$. Since $\\frac{k_{0}}{x_{k_{0}}} \\leq k_{0}$, we have $n_{0} \\geq k_{0}+1$.\n\n (2) By the minimality of $n_{0}$ and $n_{0} \\geq k_{0}+1$, we have $\\frac{n_{0}-1}{x_{n_{0}-1}} \\leq m$. If $\\frac{n_{0}-1}{x_{n_{0}-1}}<m$, then\n\n \\[\n n_{0}<m x_{n_{0}-1}+1 \\quad \\Rightarrow \\quad n_{0} \\leq m x_{n_{0}-1}.\n \\]\n\n However, from $\\frac{n_{0}}{x_{n_{0}}}>m$, we have $m x_{n_{0}}<n_{0}$, so combining the two results gives\n\n \\[\n m x_{n_{0}-1} \\geq n_{0}>m x_{n_{0}},\n \\]\n\n which leads to $x_{n_{0}-1}>x_{n_{0}}$. This contradicts the condition of the problem that $x_{n+1}-x_{n} \\in\\{0,1\\}$. Therefore, we must have $\\frac{n_{0}-1}{x_{n_{0}-1}}=m$, and the proof is complete.\n\n Therefore, for any integer $m \\geq k_{0}$, there exists an $n$ such that $\\frac{n}{x_{n}}=m$, and it is obvious that these values of $n$ are different for different $m$, so the proof is complete. \\qed\n\n The following lemma is a Bernoulli-type inequality.\n\n <Lemma 2> For any integer $k \\geq 2$, we have $2^{k} \\geq \\frac{k^{2}}{2}$.\n\n <Proof of Lemma 2> Since $k \\geq 2$, by the binomial theorem, we have\n\n \\[\n 2^{k} \\geq 1+k+\\binom{k}{2}=1+\\frac{k}{2}+\\frac{k^{2}}{2}>\\frac{k^{2}-k}{2},\n \\]\n\n so the proof is complete. $\\qed$\n\n Now, let's prove the main problem.\n\n <Step 1> Finding an upper bound for $A_{n}$\n\n <Step 1.1> For a positive integer $a$ and $k \\geq 2$, let a number of the form $a^{k}$ be called a $k$-th power. Then, for any $k$-th power $a^{k}$ to be less than or equal to $n$, we must have\n\n \\[\n a^{k} \\leq n \\quad \\Rightarrow \\quad a \\leq n^{\\frac{1}{k}},\n \\]\n\n so the number of $k$-th powers less than or equal to $n$ is less than or equal to $n^{\\frac{1}{k}}$.\n\n <Step 1.2> If any $k$-th power other than 1 is less than or equal to $n$, then we must have $2^{k} \\leq n$, so $k \\leq \\log _{2} n$.\n\n <Step 1.3> By (1) and (2) above, $A_{n}$ satisfies the following:\n\n \\[\n A_{n} \\leq \\sum_{k=2}^{\\left[\\log _{2} n\\right]} n^{\\frac{1}{k}} \\leq\\left(\\left[\\log _{2} n\\right]-1\\right) n^{\\frac{1}{2}}<\\log _{2} n \\cdot n^{\\frac{1}{2}}.\n \\]\n\n <Step 2> Solving the problem using the lemma\n\n Now, let the sequence $\\left(x_{n}\\right)_{n=1}^{\\infty}$ be defined as $x_{n}=0$ if $n \\leq 2024$ and $x_{n}=A_{n-2024}$ for $n \\geq 2025$.\n\n <Step 2.1> Since $A_{1}=1$ and $A_{n+1}-A_{n}$ is 1 if $n+1$ is a perfect power and 0 otherwise, $x_{n}$ satisfies $x_{n+1}-x_{n} \\in\\{0,1\\}$ for any $n \\geq 1$.\n\n <Step 2.2> By <Step 1>, we have $A_{2^{2 k}} \\leq 2 k \\cdot 2^{k}$, so by <Lemma 2>, we have\n\n \\[\n \\frac{2^{2 k}}{A_{2^{2 k}}} \\geq \\frac{2^{k}}{2 k} \\geq \\frac{k}{4}.\n \\]\n\n Since $A_{n}$ is an increasing sequence, we have $A_{n} \\geq x_{n}$, so $\\frac{n}{x_{n}} \\geq \\frac{n}{A_{n}}$. Combining these results gives\n\n \\[\n \\frac{2^{2 k}}{x_{2^{2 k}}} \\geq \\frac{2^{2 k}}{A_{2^{2 k}}} \\geq \\frac{k}{4},\n \\]\n\n so for any $M>0$, there exists an $n$ such that $\\frac{n}{x_{n}}>M$.\n\n <Step 2.3> By (1), (2), and <Lemma 1> above, there are infinitely many $n$ such that $x_{n} \\mid n$. Therefore, there are also infinitely many $n$ such that\n\n \\[\n \\frac{n+2024}{A_{n}}=\\frac{n+2024}{x_{n+2024}}\n \\]\n\n is a positive integer.", "grading_guidelines": "(Partial)\n 1. Observed that $A_n$ is a slowly increasing sequence, and from there guessed that the sequence satisfied some property such as Lemma 1 of the given solution.\n(Almost)\n 1. Applied intermediate value property to get useful information, but couldn't complete the proof.", "problem_id": "PB-Advanced-001", "level": "advanced", "category": "Algebra", "source": "Novel Problem", "max_score": 7, "difficulty": "IMO-easy", "short_answer": " "}12345678910#!/bin/sh# Reward measures structural submission validity only, not mathematical correctness.# External rubric-guided LLM judging against reference.json awards 0–7 points.# Offline, isolated Python; PROOF and VERIFIER_DIR allow local verification.set -euhere=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)export TESTS_DIR="$here" PROOF="${PROOF:-/app/proof.md}" VERIFIER_DIR="${VERIFIER_DIR:-/logs/verifier}"mkdir -p "$VERIFIER_DIR"printf '0\n' > "$VERIFIER_DIR/reward.txt"python3 -I -S "$here/grade_task.py"1234567# PB-Advanced-002
Solve the following problem using your own reasoning and local tools. Do not use web lookups or external models. Write a complete, self-contained, rigorous mathematical proof to `/app/proof.md`; create `/app` if necessary.
## Problem
There are 120 students in DeepMind highschool, and each student `loves' some of the students. Here `love' is not always a mutual relationship; a student A may love B while B may not love A, and it is also possible that a student loves oneself. For the set $F$ of all $2^{120}$ subsets of the students, define the function $f: F \rightarrow F$ as the function that maps each $X \in F$ to the set of students loved by one or more students in $X$. For $A, B \in F$, $A$ and $B$ are said to have a 'lovely relationship' iff there exists a natural number $k$ such that $f^{k}(A)=B$. Now we want to select distinct elements $A_{1}, A_{2}, \cdots A_{t}$ from $F$ such that for any $1 \leq i<j \leq t$, $A_{i}$ and $A_{j}$ have a lovely relationship. Let $M(f)$ be the maximum possible value of $t$. Show that $M(f) \leq 2^{70}$. 1234567891011121314#!/bin/shset -euPROOF=${PROOF:-/app/proof.md}mkdir -p "$(dirname -- "$PROOF")"cat > "$PROOF" <<'IMO_PROOF_8c23379d2dbd8bab9f908bb30e1771c53dda798608434dee12cb5c4cacf36511'To being with, we prove there must be some $A \in F$ such that $\left\{A_{1}, \cdots A_{t}\right\} \subset \cup_{i=0}^{\infty}\left\{f^{i}(A)\right\}$. Why is this? Consider a graph $H$ with $A_{1}, A_{2}, \cdots A_{t}$ as its vertices. If $f^{k}\left(A_{i}\right)=A_{j}$ for some $k$, draw a directed edge $A_{i} \rightarrow A_{j}$ to create a directed graph. This graph is a tournament. Now, if there is a vertex $A$ such that $d^{-}(A)=0$, then it holds directly. If not, then in this graph, the in-degree of any vertex is at least 1. This means the graph contains a cycle. Having a cycle means that for each element $A$ in the cycle, there is some $T$ such that $f^{T}(A)=A$. Therefore, for two vertices $A, B$ in the cycle, if $f^{i}(A)=B$, then $f^{T-i}(B)=A$. This means any two vertices in the cycle can reach each other via applications of $f$. Now, if we remove all but one vertex from the cycle and then use induction on the number of vertices, we can immediately find that there is a vertex $A$ such that $d^{+}(A)=t-1$. Thus, we can obtain our desired conclusion.
Now, considering a directed graph $G$ whose vertices are the students and where an edge $i \rightarrow j$ is drawn if student $i$ loves student $j$, we need to find $\max_{A_0 \in F} \left| \{f^i(A_0) \mid i \in \mathbb{Z}_{\ge 0} \} \right|$. Now, in $G$, let's perform the following procedure: \begin{itemize} \item Pick any cycle in $G$ and call it $C_{1}$. \item Pick any cycle in $G-C_{1}$ (the graph after removing all vertices of $C_1$) and call it $C_{2}$. \item Repeat this procedure until no more cycles can be found. \end{itemize} As a result of this procedure, we will have disjoint cycles $C_{1}, C_{2}, \cdots, C_{m}$, and a graph $H$ (which is $G - \bigcup C_i$) that has no cycles. Let $a_i$ be the number of vertices in $C_i$, and let $|V(H)|=x$. Then $a_{1}+a_{2}+\cdots+a_{m}=n-x \leq n$ (where $n=120$). Let $L =c\operatorname{lcm}\left[a_{1}, a_{2}, \cdots, a_{m}\right]$, where $c$ is the smallest positive integer such that $L\ge n$.\\Consider some nonempty $A \subset V(G)$. Now, if we define $T(k) = \bigcup_{j=1}^{m} (f^{k}(A) \cap C_{j})$, then since each $|f^{k}(A) \cap C_{j}|$ is non-decreasing, $|T(k)|$ is a non-decreasing function. Now let's look at $|T(L)|, \cdots, |T((2n+1)L)|$. Since $|T(k)| \leq |V(G)|=n$ and $|T(k)|$ is non-decreasing, there exists some $i$ such that $|T(iL)|=|T((i+1)L)|=|T((i+2)L)|$. At this point, by the definition of $L$, it must be that $T(iL) \subset T((i+1)L) \subset T((i+2)L)$, and therefore $T(iL)=T((i+1)L)=T((i+2)L)$. Therefore, for each $1 \leq r < L$, $T(iL+r)=T((i+1)L+r)$ also holds.\\Now, if $f^{(i+2)L}(A) \neq f^{(i+1)L}(A)$, then there must be a $v_{0} \in f^{(i+2)L}(A) \triangle f^{(i+1)L}(A)$ (symmetric difference; $A \triangle B=(A-B) \cup (B-A)$), and in this case, $v_{0} \in H$ must hold. Therefore, there also exists $v_1 \in f^{(i+2)L-1}(A) \triangle f^{(i+1)L-1}(A)$ (from which $v_0$ is reached), and $v_2 \in \dots$, so we can keep finding $v_j$ such that there is a path $v_k \rightarrow \dots \rightarrow v_1 \rightarrow v_0$. If $v_1 , v_2, \cdots, v_{|V(H)|+1}$ are all in $H$, then some point should appear at least twice, which is a contradiction to the fact that $H$ has no cycles. Therefore, there exists some $k \le n$ such that $v_k \not \in H$, or equivalently $v_k \in \bigcup C_j$. However, since $v_k \in f^{(i+2)L -k} (A) \triangle f^{(i+1)L -k} (A)$ where $k \le n \le L$, this is a contradiction to the observation above that $T(iL+r)=T((i+1)L+r)$ for each $1\le r \le L$.
Thus, $f^{(i+2)L}(A)=f^{(i+1)L}(A)$ and thus it follows that $\left\{f^{j}(A) \mid j \in \mathbb{Z}_{\ge 0}\right\}=\left\{f^{j}(A) \mid j \leq (i+1)L \right\}$. Since $i <2n$, we can conclude that $M(f) \leq 2nL$.\\Now, $\operatorname{lcm}[a_1, a_2, \cdots, a_m] \leq 120 \cdot 60 \cdot 40 \cdot 30 \cdot 24 \cdot 20 \cdot 17 \cdot 15 \cdot 13 \cdot \operatorname{lcm}[1,2,3, \cdots, 12]<2^{60}$ so $L \le \max\{2^{60}, 2n\} = 2^{60}$ Since $2n=240<2^8$, $2nL < 2^8 \cdot 2^{60} = 2^{68}$.IMO_PROOF_8c23379d2dbd8bab9f908bb30e1771c53dda798608434dee12cb5c4cacf365111234567891011121314151617181920schema_version = "1.4"artifacts = ["/app/proof.md"][task]name = "imo-proofbench/pb-advanced-002"version = "1.0.0"description = "IMO-ProofBench mathematical proof task"keywords = ["math", "proof", "imo"][metadata]problem_id = "PB-Advanced-002"level = "advanced"[agent]network_mode = "allowlist"timeout_sec = 3600[environment]docker_image = "docker.io/library/python:3.12-slim"cpus = 1memory_mb = 2048[verifier]network_mode = "allowlist"timeout_sec = 18012345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758"""Offline structural validation only; external rubric judge assigns 0–7 points."""import json, os, statLIMIT = 200_000
def read_own(path): """Reject links, special files, multiple hard links, and oversized files.""" parts = os.path.abspath(path).split('/')[1:] folder = os.open('/', os.O_RDONLY | os.O_DIRECTORY) try: for part in parts[:-1]: inner = os.open(part, os.O_RDONLY | os.O_DIRECTORY | os.O_NOFOLLOW, dir_fd=folder) os.close(folder) folder = inner fd = os.open(parts[-1], os.O_RDONLY | os.O_NOFOLLOW | os.O_NONBLOCK, dir_fd=folder) finally: os.close(folder) with os.fdopen(fd, 'rb') as stream: info = os.fstat(stream.fileno()) if not stat.S_ISREG(info.st_mode) or info.st_nlink != 1: raise ValueError('not a regular file with one link') data = stream.read(LIMIT + 1) if len(data) > LIMIT: raise ValueError('file exceeds 200000 bytes') return data
def write_new(path, data): try: os.unlink(path) except FileNotFoundError: pass fd = os.open(path, os.O_WRONLY | os.O_CREAT | os.O_EXCL | os.O_NOFOLLOW, 0o644) with os.fdopen(fd, 'wb') as f: f.write(data)
def main(): out = os.environ['VERIFIER_DIR'] os.makedirs(out, exist_ok=True) write_new(os.path.join(out, 'reward.txt'), b'0\n') proof_path = os.path.join(out, 'proof.md') try: os.unlink(proof_path) except FileNotFoundError: pass reference = open(os.path.join(os.environ['TESTS_DIR'], 'reference.json'), 'rb').read() json.loads(reference) write_new(os.path.join(out, 'reference.json'), reference) status, count, reason = 'missing', 0, 'proof unavailable or invalid' try: raw = read_own(os.environ['PROOF']) proof = raw.decode('utf-8', 'strict') count = len(proof) write_new(proof_path, raw) if sum(not c.isspace() for c in proof) < 20: status, reason = 'empty', 'fewer than 20 non-whitespace characters' else: status, reason = 'submitted_for_judge', 'structurally valid submission' except (OSError, ValueError, UnicodeError) as e: reason = 'proof unavailable or invalid: ' + str(e)[:200] result = {'status': status, 'char_count': count, 'requires_llm_judge': True, 'max_score': 7, 'reason': reason} write_new(os.path.join(out, 'grade.json'), (json.dumps(result, ensure_ascii=False, indent=2)+'\n').encode()) if status == 'submitted_for_judge': write_new(os.path.join(out, 'reward.txt'), b'1\n') print(status, 'structural reward:', int(status == 'submitted_for_judge'))if __name__ == '__main__': main()123456789101112{ "problem": "There are 120 students in DeepMind highschool, and each student `loves' some of the students. Here `love' is not always a mutual relationship; a student A may love B while B may not love A, and it is also possible that a student loves oneself. For the set $F$ of all $2^{120}$ subsets of the students, define the function $f: F \\rightarrow F$ as the function that maps each $X \\in F$ to the set of students loved by one or more students in $X$. For $A, B \\in F$, $A$ and $B$ are said to have a 'lovely relationship' iff there exists a natural number $k$ such that $f^{k}(A)=B$. Now we want to select distinct elements $A_{1}, A_{2}, \\cdots A_{t}$ from $F$ such that for any $1 \\leq i<j \\leq t$, $A_{i}$ and $A_{j}$ have a lovely relationship. Let $M(f)$ be the maximum possible value of $t$. Show that $M(f) \\leq 2^{70}$. ", "solution": "To being with, we prove there must be some $A \\in F$ such that $\\left\\{A_{1}, \\cdots A_{t}\\right\\} \\subset \\cup_{i=0}^{\\infty}\\left\\{f^{i}(A)\\right\\}$. Why is this? Consider a graph $H$ with $A_{1}, A_{2}, \\cdots A_{t}$ as its vertices. If $f^{k}\\left(A_{i}\\right)=A_{j}$ for some $k$, draw a directed edge $A_{i} \\rightarrow A_{j}$ to create a directed graph. This graph is a tournament. Now, if there is a vertex $A$ such that $d^{-}(A)=0$, then it holds directly. If not, then in this graph, the in-degree of any vertex is at least 1. This means the graph contains a cycle. Having a cycle means that for each element $A$ in the cycle, there is some $T$ such that $f^{T}(A)=A$. Therefore, for two vertices $A, B$ in the cycle, if $f^{i}(A)=B$, then $f^{T-i}(B)=A$. This means any two vertices in the cycle can reach each other via applications of $f$. Now, if we remove all but one vertex from the cycle and then use induction on the number of vertices, we can immediately find that there is a vertex $A$ such that $d^{+}(A)=t-1$. Thus, we can obtain our desired conclusion.\n\nNow, considering a directed graph $G$ whose vertices are the students and where an edge $i \\rightarrow j$ is drawn if student $i$ loves student $j$, we need to find $\\max_{A_0 \\in F} \\left| \\{f^i(A_0) \\mid i \\in \\mathbb{Z}_{\\ge 0} \\} \\right|$. Now, in $G$, let's perform the following procedure: \\begin{itemize} \\item Pick any cycle in $G$ and call it $C_{1}$. \\item Pick any cycle in $G-C_{1}$ (the graph after removing all vertices of $C_1$) and call it $C_{2}$. \\item Repeat this procedure until no more cycles can be found. \\end{itemize} As a result of this procedure, we will have disjoint cycles $C_{1}, C_{2}, \\cdots, C_{m}$, and a graph $H$ (which is $G - \\bigcup C_i$) that has no cycles. Let $a_i$ be the number of vertices in $C_i$, and let $|V(H)|=x$. Then $a_{1}+a_{2}+\\cdots+a_{m}=n-x \\leq n$ (where $n=120$). Let $L =c\\operatorname{lcm}\\left[a_{1}, a_{2}, \\cdots, a_{m}\\right]$, where $c$ is the smallest positive integer such that $L\\ge n$.\n\\\\Consider some nonempty $A \\subset V(G)$. Now, if we define $T(k) = \\bigcup_{j=1}^{m} (f^{k}(A) \\cap C_{j})$, then since each $|f^{k}(A) \\cap C_{j}|$ is non-decreasing, $|T(k)|$ is a non-decreasing function. Now let's look at $|T(L)|, \\cdots, |T((2n+1)L)|$. Since $|T(k)| \\leq |V(G)|=n$ and $|T(k)|$ is non-decreasing, there exists some $i$ such that $|T(iL)|=|T((i+1)L)|=|T((i+2)L)|$. At this point, by the definition of $L$, it must be that $T(iL) \\subset T((i+1)L) \\subset T((i+2)L)$, and therefore $T(iL)=T((i+1)L)=T((i+2)L)$. Therefore, for each $1 \\leq r < L$, $T(iL+r)=T((i+1)L+r)$ also holds.\n\\\\Now, if $f^{(i+2)L}(A) \\neq f^{(i+1)L}(A)$, then there must be a $v_{0} \\in f^{(i+2)L}(A) \\triangle f^{(i+1)L}(A)$ (symmetric difference; $A \\triangle B=(A-B) \\cup (B-A)$), and in this case, $v_{0} \\in H$ must hold. Therefore, there also exists $v_1 \\in f^{(i+2)L-1}(A) \\triangle f^{(i+1)L-1}(A)$ (from which $v_0$ is reached), and $v_2 \\in \\dots$, so we can keep finding $v_j$ such that there is a path $v_k \\rightarrow \\dots \\rightarrow v_1 \\rightarrow v_0$. If $v_1 , v_2, \\cdots, v_{|V(H)|+1}$ are all in $H$, then some point should appear at least twice, which is a contradiction to the fact that $H$ has no cycles. Therefore, there exists some $k \\le n$ such that $v_k \\not \\in H$, or equivalently $v_k \\in \\bigcup C_j$. However, since $v_k \\in f^{(i+2)L -k} (A) \\triangle f^{(i+1)L -k} (A)$ where $k \\le n \\le L$, this is a contradiction to the observation above that $T(iL+r)=T((i+1)L+r)$ for each $1\\le r \\le L$.\n\nThus, $f^{(i+2)L}(A)=f^{(i+1)L}(A)$ and thus it follows that $\\left\\{f^{j}(A) \\mid j \\in \\mathbb{Z}_{\\ge 0}\\right\\}=\\left\\{f^{j}(A) \\mid j \\leq (i+1)L \\right\\}$. Since $i <2n$, we can conclude that $M(f) \\leq 2nL$.\n\\\\Now, $\\operatorname{lcm}[a_1, a_2, \\cdots, a_m] \\leq 120 \\cdot 60 \\cdot 40 \\cdot 30 \\cdot 24 \\cdot 20 \\cdot 17 \\cdot 15 \\cdot 13 \\cdot \\operatorname{lcm}[1,2,3, \\cdots, 12]<2^{60}$ so $L \\le \\max\\{2^{60}, 2n\\} = 2^{60}$ Since $2n=240<2^8$, $2nL < 2^8 \\cdot 2^{60} = 2^{68}$.", "grading_guidelines": "(Partial)\n 1. Proved there must be some $A \\in F$ such that $\\left\\{A_{1}, \\cdots A_{t}\\right\\} \\subset \\cup_{i=0}^{\\infty}\\left\\{f^{i}(A)\\right\\}$.\n 2. Considered the non-intersecting cycles\n(Almost)\n 1. Introduced a quantity like $\\lcm[a_1, a_2, \\cdots, a_n]$, but failed to find the desired numerical bound.\n 2. Verification contains minor mistakes only.", "problem_id": "PB-Advanced-002", "level": "advanced", "category": "Combinatorics", "source": "Novel Problem", "max_score": 7, "difficulty": "IMO-medium", "short_answer": " "}12345678910#!/bin/sh# Reward measures structural submission validity only, not mathematical correctness.# External rubric-guided LLM judging against reference.json awards 0–7 points.# Offline, isolated Python; PROOF and VERIFIER_DIR allow local verification.set -euhere=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)export TESTS_DIR="$here" PROOF="${PROOF:-/app/proof.md}" VERIFIER_DIR="${VERIFIER_DIR:-/logs/verifier}"mkdir -p "$VERIFIER_DIR"printf '0\n' > "$VERIFIER_DIR/reward.txt"python3 -I -S "$here/grade_task.py"1234567# PB-Advanced-003
Solve the following problem using your own reasoning and local tools. Do not use web lookups or external models. Write a complete, self-contained, rigorous mathematical proof to `/app/proof.md`; create `/app` if necessary.
## Problem
Let $ ABC $ be an acute triangle which is not an isosceles.Let $ I $ be the incenter and let $ \omega $ be the circumcircle of $ABC$. Let the intersections of lines $ AI $, $ BI $, and $ CI $ with $ BC $, $ CA $, and $ AB $ be $ D $, $ E $, and $ F $ respectively. Also, let $ \omega_A $ be the circle that lies inside $\angle BAC$, tangent to lines $ AB $ and $ AC $, and internally tangent to the circumcircle $ \omega $ at $ T_A $. Similarly, define $ T_B $ and $ T_C $ for points $ B $ and $ C $ respectively. Prove that there exist two points $ X $ and $ Y $ such that the circumcircles of triangles $ ADT_A $, $ BET_B $, and $ CFT_C $ all pass through $ X $ and $ Y $.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687#!/bin/shset -euPROOF=${PROOF:-/app/proof.md}mkdir -p "$(dirname -- "$PROOF")"cat > "$PROOF" <<'IMO_PROOF_a314b74d2e11d6fd69b0bd10639fc1e084b086ac891f092ab5ee9d8a8c2ef221'Let's define some points as follows: \begin{enumerate} \item Let $A_1$, $B_1$, and $C_1$ be the points of tangency of the incircle with sides $BC$, $CA$, and $AB$, respectively. \item Let $N$ be the midpoint of arc $BC$. \item Let $S_A$ be the intersection of line $NT_A$ and side $BC$ (if they are parallel, consider $S_A$ as the point at infinity). \item Let $\Gamma_A$, $\Gamma_B$, and $\Gamma_C$ be the circumcircles of triangles $ADT$, $BET$, and $CFT$, respectively. \end{enumerate}
<Step 1> Finding a point on the radical axis of circles $\Gamma_A$, $\Gamma_B$, and $\Gamma_C$
By the well-known property of Mixtilinear circles, $AT_A$ is isogonal to the line joining the point of tangency of the excircle opposite to vertex $A$ and vertex $A$. Similarly, consider the lines joining the points of tangency of the excircles opposite to vertices $B$ and $C$ with their respective vertices. It is well-known that these three lines intersect at a single point, the Nagel point. Therefore, lines $AT_A$, $BT_B$, and $CT_C$ also intersect at a single point, which is the isogonal conjugate of the Nagel point. Let this point be $T$. Clearly, $T$ lies on segments $AT_A$, $BT_B$, and $CT_C$, and is inside circles $\Gamma_A$, $\Gamma_B$, and $\Gamma_C$.
Furthermore, by the power of a point theorem with respect to the circumcircle of triangle $ABC$, we have \[AT \cdot TT_A = BT \cdot TT_B = CT \cdot TT_C.\] Therefore, point $T$ has the same power with respect to circles $\Gamma_A$, $\Gamma_B$, and $\Gamma_C.$
Hence, to prove the statement, it is sufficient to find another point that has the same power with respect to circles $\Gamma_A$, $\Gamma_B$, and $\Gamma_C$.
<Step 2> $(A, D, T_A, S_A)$ is cyclic
$\angle ADS_A = \frac{\angle A}{2} + \angle C = \angle ACN = \angle A T_A SA$, so $(A, D, T_A, S_A)$ is cyclic.
<Step 3> $\angle AIS_A = 90^\circ$
This is also a well-known property of Mixtilinear circles. By angle chasing, we can show that the circumcircles of triangles $BIC$ and $NIT_A$ are tangent to each other at point $I$. Let's consider the radical axes of these three circles: \begin{itemize} \item The radical axis of the circumcircles of triangles $BIC$ and $NITA$ is the line passing through $I$ and perpendicular to $AI$. \item The radical axis of the circumcircles of triangles $BIC$ and $ABC$ is $BC$. \item The radical axis of the circumcircles of triangles $ABC$ and $NITA$ is $NT_A$. \end{itemize} Therefore, the intersection point $S_A$ of $BC$ and $NT_A$ satisfies $\angle AIS_A = 90^\circ$.
<Step 4> Inversion with respect to the incircle of triangle $ABC$
Now, let's invert the figure with respect to the incircle $I$. In particular, let's pay attention to which circle $I$ maps to under this inversion. Let $A'$, $B'$, and $C'$ be the images of points $A$, $B$, and $C$ under the inversion. Also, let $D'$ and $S_A'$ be the images of points $D$ and $S_A$ under the inversion.
Let's investigate the properties of the inverted points. Since $DA_1$ is tangent to the circle, $D'$ is the foot of the perpendicular from $A_1$ to $ID$. $A'$ is the midpoint of $B_1C_1$. Finally, since $SA_1$ is tangent to the circle, $S_A'$ is the foot of the perpendicular from $A_1$ to $IS_A$. By the conclusion of Step 3, $A_1S_A'$ is parallel to $AI$. By the observation from step 2, the inversion of the circumcircle of $ADT_A$ is the circumcircle of triangle $A'S_A'D'$. Similarly, the circumcircles of $B'S_B'E'$ and $C'S_C'F'$ are our desired circles. Let's prove that the three circumcircles pass through two common points.
<Step 5> The circumcircles of triangles $A'S_A'D', B'S_B'E'$, and $C'S_C'F'$ pass through two common points
Now, let's consider the figure with respect to triangle $A_1B_1C_1$.
In triangle $A_1B_1C_1$, point $I$ is the circumcenter. Let $H_1$ be the foot of the perpendicular from $A_1$ to $B_1C_1$. Then, points $A'$, $S_A'$, and $D'$ are constructed as follows: \begin{itemize} \item Point $A'$ is the midpoint of $B_1C_1$. \item Point $D'$ is the intersection of the line parallel to $B_1C_1$ passing through $A_1$ and the perpendicular bisector of $B_1C_1$. \item Point $S_A'$ is the foot of the perpendicular from $I$ to $AH_1$. \end{itemize} Through this construction, we can find that the circumcenter $O_A$ of triangle $A'S_A'D'$ lies on the perpendicular bisector of $A'D'$, which is the line $B'C'$. Now, let's consider the point $O_A'$ which is the reflection of $O_A$ with respect to the midpoint of $B'C'$.
<Step 6> $O_A'$ is the circumcenter of triangle $A_1IH_1$
Since $A'$, $B'$, $C'$, and $H_1$ lie on the nine-point circle of triangle $ABC$, these four points are concyclic. Therefore, quadrilateral $A'H_1 B'C'$ is an isosceles trapezoid, and points $A'$ and $H_1$ are symmetric with respect to the perpendicular bisector of line $B_1 C_1$. Furthermore, $A_1$ and $D'$ are symmetric with respect to the perpendicular bisector of line $B'C'$. Therefore, triangle $AIH_1$ is the reflection of triangle $A'S_A'D'$ across the perpendicular bisector of line $B'C'$, and the circumcenters $O_A$ and $O_A'$ are also symmetric with respect to each other.
<Step 7> $O_A, O_B$, and $O_C$ are collinear
Now, let's define $O_B, O_C, O_B'$, and $O_C'$ similarly, and show that $O_A, O_B$, and $O_C$ are collinear. First, let's show that $O_A'$, $O_B'$, and $O_C'$ are collinear. It is sufficient to prove that the circumcircles of triangles $AIH_1$, $BIH_B$, and $C_1IH_C$ have a common radical axis. On the other hand, the circumcenter $I$ of $ABC$ and the orthocenter $A_1H_A \cap B_1H_B \cap C_1H_C$ have the same power with respect to these three circumcircles. Therefore, these three circles have a common radical axis. Hence, the centers of these three circles, $O_A'$, $O_B'$, and $O_C'$, are collinear. Now, by Menelaus' theorem, we have \[\frac{C'O_A' \cdot B'O_C' \cdot A'O_B'}{O_A'B' \cdot O_C'A' \cdot O_B'C'} = 1\] \[\frac{C'O_A \cdot B'O_C \cdot A'O_B}{O_AB' \cdot O_CA' \cdot O_BC'} = 1\] Therefore, $O_A, O_B$, and $O_C$ are also collinear.
<Step 8> Circles $\Gamma_A, \Gamma_B$, and $\Gamma_C$ have two common points
Now, the circles $\Gamma_A, \Gamma_B$, and $\Gamma_C$ are inverted into circles. The centers of these three circles are collinear, as proven earlier. Therefore, these three circles either have a common radical axis or their radical axes are parallel. This property remains true before the inversion. However, in Step 1, we found point $T$ that has the same power with respect to these three circles. Therefore, circles $\Gamma_A, \Gamma_B$, and $\Gamma_C$ have a common radical axis. Furthermore, since point $T$ lies inside all three circles, this common radical axis intersects each circle at two distinct points. Therefore, the three circles have two common points.IMO_PROOF_a314b74d2e11d6fd69b0bd10639fc1e084b086ac891f092ab5ee9d8a8c2ef2211234567891011121314151617181920schema_version = "1.4"artifacts = ["/app/proof.md"][task]name = "imo-proofbench/pb-advanced-003"version = "1.0.0"description = "IMO-ProofBench mathematical proof task"keywords = ["math", "proof", "imo"][metadata]problem_id = "PB-Advanced-003"level = "advanced"[agent]network_mode = "allowlist"timeout_sec = 3600[environment]docker_image = "docker.io/library/python:3.12-slim"cpus = 1memory_mb = 2048[verifier]network_mode = "allowlist"timeout_sec = 18012345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758"""Offline structural validation only; external rubric judge assigns 0–7 points."""import json, os, statLIMIT = 200_000
def read_own(path): """Reject links, special files, multiple hard links, and oversized files.""" parts = os.path.abspath(path).split('/')[1:] folder = os.open('/', os.O_RDONLY | os.O_DIRECTORY) try: for part in parts[:-1]: inner = os.open(part, os.O_RDONLY | os.O_DIRECTORY | os.O_NOFOLLOW, dir_fd=folder) os.close(folder) folder = inner fd = os.open(parts[-1], os.O_RDONLY | os.O_NOFOLLOW | os.O_NONBLOCK, dir_fd=folder) finally: os.close(folder) with os.fdopen(fd, 'rb') as stream: info = os.fstat(stream.fileno()) if not stat.S_ISREG(info.st_mode) or info.st_nlink != 1: raise ValueError('not a regular file with one link') data = stream.read(LIMIT + 1) if len(data) > LIMIT: raise ValueError('file exceeds 200000 bytes') return data
def write_new(path, data): try: os.unlink(path) except FileNotFoundError: pass fd = os.open(path, os.O_WRONLY | os.O_CREAT | os.O_EXCL | os.O_NOFOLLOW, 0o644) with os.fdopen(fd, 'wb') as f: f.write(data)
def main(): out = os.environ['VERIFIER_DIR'] os.makedirs(out, exist_ok=True) write_new(os.path.join(out, 'reward.txt'), b'0\n') proof_path = os.path.join(out, 'proof.md') try: os.unlink(proof_path) except FileNotFoundError: pass reference = open(os.path.join(os.environ['TESTS_DIR'], 'reference.json'), 'rb').read() json.loads(reference) write_new(os.path.join(out, 'reference.json'), reference) status, count, reason = 'missing', 0, 'proof unavailable or invalid' try: raw = read_own(os.environ['PROOF']) proof = raw.decode('utf-8', 'strict') count = len(proof) write_new(proof_path, raw) if sum(not c.isspace() for c in proof) < 20: status, reason = 'empty', 'fewer than 20 non-whitespace characters' else: status, reason = 'submitted_for_judge', 'structurally valid submission' except (OSError, ValueError, UnicodeError) as e: reason = 'proof unavailable or invalid: ' + str(e)[:200] result = {'status': status, 'char_count': count, 'requires_llm_judge': True, 'max_score': 7, 'reason': reason} write_new(os.path.join(out, 'grade.json'), (json.dumps(result, ensure_ascii=False, indent=2)+'\n').encode()) if status == 'submitted_for_judge': write_new(os.path.join(out, 'reward.txt'), b'1\n') print(status, 'structural reward:', int(status == 'submitted_for_judge'))if __name__ == '__main__': main()123456789101112{ "problem": "Let $ ABC $ be an acute triangle which is not an isosceles.Let $ I $ be the incenter and let $ \\omega $ be the circumcircle of $ABC$. Let the intersections of lines $ AI $, $ BI $, and $ CI $ with $ BC $, $ CA $, and $ AB $ be $ D $, $ E $, and $ F $ respectively. Also, let $ \\omega_A $ be the circle that lies inside $\\angle BAC$, tangent to lines $ AB $ and $ AC $, and internally tangent to the circumcircle $ \\omega $ at $ T_A $. Similarly, define $ T_B $ and $ T_C $ for points $ B $ and $ C $ respectively. Prove that there exist two points $ X $ and $ Y $ such that the circumcircles of triangles $ ADT_A $, $ BET_B $, and $ CFT_C $ all pass through $ X $ and $ Y $.", "solution": "Let's define some points as follows:\n \\begin{enumerate}\n \\item Let $A_1$, $B_1$, and $C_1$ be the points of tangency of the incircle with sides $BC$, $CA$, and $AB$, respectively.\n \\item Let $N$ be the midpoint of arc $BC$.\n \\item Let $S_A$ be the intersection of line $NT_A$ and side $BC$ (if they are parallel, consider $S_A$ as the point at infinity).\n \\item Let $\\Gamma_A$, $\\Gamma_B$, and $\\Gamma_C$ be the circumcircles of triangles $ADT$, $BET$, and $CFT$, respectively.\n \\end{enumerate}\n\n <Step 1> Finding a point on the radical axis of circles $\\Gamma_A$, $\\Gamma_B$, and $\\Gamma_C$\n\n By the well-known property of Mixtilinear circles, $AT_A$ is isogonal to the line joining the point of tangency of the excircle opposite to vertex $A$ and vertex $A$.\n Similarly, consider the lines joining the points of tangency of the excircles opposite to vertices $B$ and $C$ with their respective vertices. It is well-known that these three lines intersect at a single point, the Nagel point.\n Therefore, lines $AT_A$, $BT_B$, and $CT_C$ also intersect at a single point, which is the isogonal conjugate of the Nagel point. Let this point be $T$.\n Clearly, $T$ lies on segments $AT_A$, $BT_B$, and $CT_C$, and is inside circles $\\Gamma_A$, $\\Gamma_B$, and $\\Gamma_C$.\n\n Furthermore, by the power of a point theorem with respect to the circumcircle of triangle $ABC$, we have\n \\[AT \\cdot TT_A = BT \\cdot TT_B = CT \\cdot TT_C.\\]\n Therefore, point $T$ has the same power with respect to circles $\\Gamma_A$, $\\Gamma_B$, and $\\Gamma_C.$\n\n Hence, to prove the statement, it is sufficient to find another point that has the same power with respect to circles $\\Gamma_A$, $\\Gamma_B$, and $\\Gamma_C$.\n\n <Step 2> $(A, D, T_A, S_A)$ is cyclic\n\n $\\angle ADS_A = \\frac{\\angle A}{2} + \\angle C = \\angle ACN = \\angle A T_A SA$, so $(A, D, T_A, S_A)$ is cyclic.\n\n <Step 3> $\\angle AIS_A = 90^\\circ$\n\n This is also a well-known property of Mixtilinear circles. By angle chasing, we can show that the circumcircles of triangles $BIC$ and $NIT_A$ are tangent to each other at point $I$.\n Let's consider the radical axes of these three circles:\n \\begin{itemize}\n \\item The radical axis of the circumcircles of triangles $BIC$ and $NITA$ is the line passing through $I$ and perpendicular to $AI$.\n \\item The radical axis of the circumcircles of triangles $BIC$ and $ABC$ is $BC$.\n \\item The radical axis of the circumcircles of triangles $ABC$ and $NITA$ is $NT_A$.\n \\end{itemize}\n Therefore, the intersection point $S_A$ of $BC$ and $NT_A$ satisfies $\\angle AIS_A = 90^\\circ$.\n\n <Step 4> Inversion with respect to the incircle of triangle $ABC$\n\n Now, let's invert the figure with respect to the incircle $I$. In particular, let's pay attention to which circle $I$ maps to under this inversion.\n Let $A'$, $B'$, and $C'$ be the images of points $A$, $B$, and $C$ under the inversion. Also, let $D'$ and $S_A'$ be the images of points $D$ and $S_A$ under the inversion.\n\n Let's investigate the properties of the inverted points.\n Since $DA_1$ is tangent to the circle, $D'$ is the foot of the perpendicular from $A_1$ to $ID$. $A'$ is the midpoint of $B_1C_1$. Finally, since $SA_1$ is tangent to the circle, $S_A'$ is the foot of the perpendicular from $A_1$ to $IS_A$.\n By the conclusion of Step 3, $A_1S_A'$ is parallel to $AI$.\n By the observation from step 2, the inversion of the circumcircle of $ADT_A$ is the circumcircle of triangle $A'S_A'D'$. Similarly, the circumcircles of $B'S_B'E'$ and $C'S_C'F'$ are our desired circles. Let's prove that the three circumcircles pass through two common points.\n\n <Step 5> The circumcircles of triangles $A'S_A'D', B'S_B'E'$, and $C'S_C'F'$ pass through two common points\n\n Now, let's consider the figure with respect to triangle $A_1B_1C_1$.\n\n In triangle $A_1B_1C_1$, point $I$ is the circumcenter. Let $H_1$ be the foot of the perpendicular from $A_1$ to $B_1C_1$.\n Then, points $A'$, $S_A'$, and $D'$ are constructed as follows:\n \\begin{itemize}\n \\item Point $A'$ is the midpoint of $B_1C_1$.\n \\item Point $D'$ is the intersection of the line parallel to $B_1C_1$ passing through $A_1$ and the perpendicular bisector of $B_1C_1$.\n \\item Point $S_A'$ is the foot of the perpendicular from $I$ to $AH_1$.\n \\end{itemize}\n Through this construction, we can find that the circumcenter $O_A$ of triangle $A'S_A'D'$ lies on the perpendicular bisector of $A'D'$, which is the line $B'C'$.\n Now, let's consider the point $O_A'$ which is the reflection of $O_A$ with respect to the midpoint of $B'C'$.\n\n <Step 6> $O_A'$ is the circumcenter of triangle $A_1IH_1$\n\n Since $A'$, $B'$, $C'$, and $H_1$ lie on the nine-point circle of triangle $ABC$, these four points are concyclic. Therefore, quadrilateral $A'H_1 B'C'$ is an isosceles trapezoid, and points $A'$ and $H_1$ are symmetric with respect to the perpendicular bisector of line $B_1 C_1$.\n Furthermore, $A_1$ and $D'$ are symmetric with respect to the perpendicular bisector of line $B'C'$.\n Therefore, triangle $AIH_1$ is the reflection of triangle $A'S_A'D'$ across the perpendicular bisector of line $B'C'$, and the circumcenters $O_A$ and $O_A'$ are also symmetric with respect to each other.\n\n <Step 7> $O_A, O_B$, and $O_C$ are collinear\n\n Now, let's define $O_B, O_C, O_B'$, and $O_C'$ similarly, and show that $O_A, O_B$, and $O_C$ are collinear.\n First, let's show that $O_A'$, $O_B'$, and $O_C'$ are collinear. It is sufficient to prove that the circumcircles of triangles $AIH_1$, $BIH_B$, and $C_1IH_C$ have a common radical axis.\n On the other hand, the circumcenter $I$ of $ABC$ and the orthocenter $A_1H_A \\cap B_1H_B \\cap C_1H_C$ have the same power with respect to these three circumcircles. Therefore, these three circles have a common radical axis. Hence, the centers of these three circles, $O_A'$, $O_B'$, and $O_C'$, are collinear.\n Now, by Menelaus' theorem, we have\n \\[\\frac{C'O_A' \\cdot B'O_C' \\cdot A'O_B'}{O_A'B' \\cdot O_C'A' \\cdot O_B'C'} = 1\\]\n \\[\\frac{C'O_A \\cdot B'O_C \\cdot A'O_B}{O_AB' \\cdot O_CA' \\cdot O_BC'} = 1\\]\n Therefore, $O_A, O_B$, and $O_C$ are also collinear.\n\n <Step 8> Circles $\\Gamma_A, \\Gamma_B$, and $\\Gamma_C$ have two common points\n\n Now, the circles $\\Gamma_A, \\Gamma_B$, and $\\Gamma_C$ are inverted into circles. The centers of these three circles are collinear, as proven earlier. Therefore, these three circles either have a common radical axis or their radical axes are parallel. This property remains true before the inversion.\n However, in Step 1, we found point $T$ that has the same power with respect to these three circles. Therefore, circles $\\Gamma_A, \\Gamma_B$, and $\\Gamma_C$ have a common radical axis.\n Furthermore, since point $T$ lies inside all three circles, this common radical axis intersects each circle at two distinct points. Therefore, the three circles have two common points.", "grading_guidelines": "(Partial)\n 1. Showed that $AT_a$, $BT_b, CT_c$ are concurrent (there are many possible solutions).\n(Almost)\n 1. Verification contains minor mistakes only.", "problem_id": "PB-Advanced-003", "level": "advanced", "category": "Geometry", "source": "Novel Problem", "max_score": 7, "difficulty": "IMO-hard", "short_answer": " "}12345678910#!/bin/sh# Reward measures structural submission validity only, not mathematical correctness.# External rubric-guided LLM judging against reference.json awards 0–7 points.# Offline, isolated Python; PROOF and VERIFIER_DIR allow local verification.set -euhere=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)export TESTS_DIR="$here" PROOF="${PROOF:-/app/proof.md}" VERIFIER_DIR="${VERIFIER_DIR:-/logs/verifier}"mkdir -p "$VERIFIER_DIR"printf '0\n' > "$VERIFIER_DIR/reward.txt"python3 -I -S "$here/grade_task.py"1234567# PB-Advanced-004
Solve the following problem using your own reasoning and local tools. Do not use web lookups or external models. Write a complete, self-contained, rigorous mathematical proof to `/app/proof.md`; create `/app` if necessary.
## Problem
For a positive integer $n$, a convex $18n+2$-gon $P$ is divided into $18n$ triangles by drawing $18n-1$ diagonals. Prove that we can choose two of these diagonals such that the three parts of $P$ divided by these two diagonals each contain at least $3n$ and at most $9n$ triangles.12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970#!/bin/shset -euPROOF=${PROOF:-/app/proof.md}mkdir -p "$(dirname -- "$PROOF")"cat > "$PROOF" <<'IMO_PROOF_20544fc7bf1dbcc3b99035ee4a2bcbf472b1566085f9c5eb6df601462eb90d09'First, let's look at the following well-known theorem.
<Lemma> For a graph $G$ with $n$ vertices, the following four statements are equivalent. Therefore, if one of them holds, $G$ is a tree.
(A) $G$ is connected and has no cycles.
(B) $G$ is connected and has $n-1$ edges.
(C) $G$ has $n-1$ edges and no cycles.
(D) There is exactly one path between any two vertices in $G$.
The following lemma is a general fact about the division of trees.
For a positive integer $k \geq 2$, if the degree of each vertex in a tree is at most $k$, then we can remove an edge from the tree so that both resulting connected components have size at least $\frac{n-1}{k}$.
<Proof of Lemma>
(1) Let $H_{e}, K_{e}$ be the two connected components obtained by removing an edge $e$ from the tree, and let $h_{e}, k_{e}$ be the number of vertices in the two components. (Of course, $h_{e}+k_{e}=n$.) Let $l=\{x, y\}$ be the edge for which $\min \left(h_{e}, k_{e}\right)$ is maximized. (If there are multiple such edges, choose one arbitrarily)
(2) Assume for contradiction that the smaller component obtained by removing $l$ has size less than $\frac{n-1}{k}$. Without loss of generality, let this be the component containing $x$. Let this component be $A$.
(3) Now, for any edge $e$ other than $l$ connected to vertex $y$, if we remove that edge instead of $l$, let $H_{e}$ be the component containing $l$ and $K_{e}$ be the other component. Then $H_{e}$ contains $A$, so it is larger than $A$. If the number of vertices in $H_{e}$ is less than or equal to the number of vertices in $K_{e}$, then it contradicts the maximality of $A$. Therefore, the number of vertices in $K_{e}$ must be less than the number of vertices in $H_{e}$. Therefore, by the maximality of $A$, the number of vertices in $K_{e}$ is less than or equal to the number of vertices in $A$, and therefore less than $\frac{n-1}{k}$.
(4) Therefore, when we remove each edge adjacent to vertex $y$, each resulting connected component has less than $\frac{n-1}{k}$ vertices. Since the degree of vertex $y$ is at most $k$, there are at most $k$ such components, and therefore the number of vertices excluding $y$ is less than $\frac{n-1}{k} \times k=n-1$, which is a contradiction.
Therefore, the proof is complete. \qed
Now, let's prove the problem. First, let's look at the general properties of triangulation of a convex $n$-gon before looking at the convex $18n+2$-gon.
<Step 1> Basic properties of triangulation of a convex polygon
<Step 1.1> The sum of the interior angles of a convex $n$-gon is $(n-2) \pi$. Therefore, in order for triangles with an interior angle sum of $\pi$ to divide this sum, we need a total of $n-2$ triangles. Since each time we draw a diagonal, the division of the convex $n$-gon increases by one, we know that if we have divided a convex $n$-gon into $n-2$ triangles, we have drawn a total of $n-3$ diagonals. In summary, to triangulate a convex $n$-gon, we need to draw $n-3$ diagonals to divide it into $n-2$ triangles.
<Step 1.2> If $n \geq 4$, then there are $n-2$ triangles, and each triangle cannot have all 3 sides as sides of the convex $n$-gon. Therefore, there must be at least 2 triangles that share 2 sides with the convex $n$-gon.
<Step 2> Mapping triangulation of a convex polygon to a tree
The problem of dividing a convex $n$-gon $P$ into triangles is directly related to trees. For convenience, assume $n \geq 4$. Let's consider the triangles as vertices and connect two vertices if the corresponding triangles share a side to draw a graph $G$.
<Step 2.1> By <Step 1>, this graph has $n-2$ vertices and $n-3$ edges. (This is because each diagonal drawn during the division corresponds to one edge in $G$.)
<Step 2.2> We can confirm that this graph $G$ is connected by mathematical induction. The case $n=4$ is trivial. Now, assume that $G$ is connected for triangulations of convex $n-1$-gons for $n \geq 5$, and consider a triangulation $T$ of a convex $n$-gon $P$. By (2) of <Step 1>, this triangulation includes a triangle $X$ that has two consecutive sides of $P$.
<Step 2.3> The vertex corresponding to this triangle $X$ has degree 1 in graph $G$. Let $Y$ be the vertex connected to $X$. Now, the remaining part of the $n$-gon $P$ excluding triangle $X$ is an $n-1$-gon $P^{\prime}$, and if we remove triangle $X$ from triangulation $T$, the remaining part is $T^{\prime}$, which is a triangulation of $P^{\prime}$. Let $G^{\prime}$ be the graph for this triangulation. Clearly, $G^{\prime}$ is the graph obtained by removing vertex $X$ and edge $XY$ from $G$. By the inductive hypothesis, $G^{\prime}$ is connected, so the graph $G$ obtained by adding edge $XY$ to it is also connected.
In conclusion, graph $G$ is a connected graph with $n-2$ vertices and $n-3$ edges. Therefore, by -(B), $G$ is a tree.
<Step 3> Analysis of the problem situation
<Step 3.1> According to the above analysis, we can see that the triangulation given in the problem corresponds to a tree $T$ with $18n$ vertices. It is very important that the degree of each vertex in this tree is at most 3.
<Step 3.2> Choosing two diagonals to divide the convex $18n+2$-gon can be thought of as removing two edges from this tree to divide it into three connected components. The question is whether we can do this so that the size of each connected component is at least $3n-1$ and at most $8n+1$.
<Step 4> Solving the problem
<Step 4.1> First, the tree $T$ corresponding to the triangulation has $18n$ vertices, and the degree of each vertex is at most 3. Therefore, by Lemma, we can remove one edge to make the sizes of the two resulting components at least $6n-1$.
<Step 4.2> Let $A$ be the component with fewer vertices and $B$ be the component with more vertices (if the sizes are the same, assign $A$ and $B$ arbitrarily). The number of vertices in $A$ is at least $6n-1$ and at most $9n$, and the number of vertices in $B$ is at least $9n$ and at most $12n+1$.
<Step 4.3> Since $B$ is also a tree with degree at most 3, we can apply again to $B$. By removing one edge from $B$, we can divide it into $B_{1}, B_{2}$ so that the size of each component is at least $\frac{9n-1}{3}$ and at most $\frac{2(12 n+1)+1}{3}=8 n+1$. Therefore, the sizes of $B_{1}, B_{2}$ are at least $3n$ and at most $8n+1$.
<Step 4.4> Therefore, we can divide it into $A, B_{1}, B_{2}$.IMO_PROOF_20544fc7bf1dbcc3b99035ee4a2bcbf472b1566085f9c5eb6df601462eb90d091234567891011121314151617181920schema_version = "1.4"artifacts = ["/app/proof.md"][task]name = "imo-proofbench/pb-advanced-004"version = "1.0.0"description = "IMO-ProofBench mathematical proof task"keywords = ["math", "proof", "imo"][metadata]problem_id = "PB-Advanced-004"level = "advanced"[agent]network_mode = "allowlist"timeout_sec = 3600[environment]docker_image = "docker.io/library/python:3.12-slim"cpus = 1memory_mb = 2048[verifier]network_mode = "allowlist"timeout_sec = 18012345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758"""Offline structural validation only; external rubric judge assigns 0–7 points."""import json, os, statLIMIT = 200_000
def read_own(path): """Reject links, special files, multiple hard links, and oversized files.""" parts = os.path.abspath(path).split('/')[1:] folder = os.open('/', os.O_RDONLY | os.O_DIRECTORY) try: for part in parts[:-1]: inner = os.open(part, os.O_RDONLY | os.O_DIRECTORY | os.O_NOFOLLOW, dir_fd=folder) os.close(folder) folder = inner fd = os.open(parts[-1], os.O_RDONLY | os.O_NOFOLLOW | os.O_NONBLOCK, dir_fd=folder) finally: os.close(folder) with os.fdopen(fd, 'rb') as stream: info = os.fstat(stream.fileno()) if not stat.S_ISREG(info.st_mode) or info.st_nlink != 1: raise ValueError('not a regular file with one link') data = stream.read(LIMIT + 1) if len(data) > LIMIT: raise ValueError('file exceeds 200000 bytes') return data
def write_new(path, data): try: os.unlink(path) except FileNotFoundError: pass fd = os.open(path, os.O_WRONLY | os.O_CREAT | os.O_EXCL | os.O_NOFOLLOW, 0o644) with os.fdopen(fd, 'wb') as f: f.write(data)
def main(): out = os.environ['VERIFIER_DIR'] os.makedirs(out, exist_ok=True) write_new(os.path.join(out, 'reward.txt'), b'0\n') proof_path = os.path.join(out, 'proof.md') try: os.unlink(proof_path) except FileNotFoundError: pass reference = open(os.path.join(os.environ['TESTS_DIR'], 'reference.json'), 'rb').read() json.loads(reference) write_new(os.path.join(out, 'reference.json'), reference) status, count, reason = 'missing', 0, 'proof unavailable or invalid' try: raw = read_own(os.environ['PROOF']) proof = raw.decode('utf-8', 'strict') count = len(proof) write_new(proof_path, raw) if sum(not c.isspace() for c in proof) < 20: status, reason = 'empty', 'fewer than 20 non-whitespace characters' else: status, reason = 'submitted_for_judge', 'structurally valid submission' except (OSError, ValueError, UnicodeError) as e: reason = 'proof unavailable or invalid: ' + str(e)[:200] result = {'status': status, 'char_count': count, 'requires_llm_judge': True, 'max_score': 7, 'reason': reason} write_new(os.path.join(out, 'grade.json'), (json.dumps(result, ensure_ascii=False, indent=2)+'\n').encode()) if status == 'submitted_for_judge': write_new(os.path.join(out, 'reward.txt'), b'1\n') print(status, 'structural reward:', int(status == 'submitted_for_judge'))if __name__ == '__main__': main()123456789101112{ "problem": "For a positive integer $n$, a convex $18n+2$-gon $P$ is divided into $18n$ triangles by drawing $18n-1$ diagonals. Prove that we can choose two of these diagonals such that the three parts of $P$ divided by these two diagonals each contain at least $3n$ and at most $9n$ triangles.", "solution": "First, let's look at the following well-known theorem.\n\n <Lemma>\n For a graph $G$ with $n$ vertices, the following four statements are equivalent. Therefore, if one of them holds, $G$ is a tree.\n\n (A) $G$ is connected and has no cycles.\n\n (B) $G$ is connected and has $n-1$ edges.\n\n (C) $G$ has $n-1$ edges and no cycles.\n\n (D) There is exactly one path between any two vertices in $G$.\n\n The following lemma is a general fact about the division of trees.\n\n For a positive integer $k \\geq 2$, if the degree of each vertex in a tree is at most $k$, then we can remove an edge from the tree so that both resulting connected components have size at least $\\frac{n-1}{k}$.\n\n <Proof of Lemma>\n\n (1) Let $H_{e}, K_{e}$ be the two connected components obtained by removing an edge $e$ from the tree, and let $h_{e}, k_{e}$ be the number of vertices in the two components. (Of course, $h_{e}+k_{e}=n$.) Let $l=\\{x, y\\}$ be the edge for which $\\min \\left(h_{e}, k_{e}\\right)$ is maximized. (If there are multiple such edges, choose one arbitrarily)\n\n (2) Assume for contradiction that the smaller component obtained by removing $l$ has size less than $\\frac{n-1}{k}$. Without loss of generality, let this be the component containing $x$. Let this component be $A$.\n\n (3) Now, for any edge $e$ other than $l$ connected to vertex $y$, if we remove that edge instead of $l$, let $H_{e}$ be the component containing $l$ and $K_{e}$ be the other component. Then $H_{e}$ contains $A$, so it is larger than $A$. If the number of vertices in $H_{e}$ is less than or equal to the number of vertices in $K_{e}$, then it contradicts the maximality of $A$. Therefore, the number of vertices in $K_{e}$ must be less than the number of vertices in $H_{e}$. Therefore, by the maximality of $A$, the number of vertices in $K_{e}$ is less than or equal to the number of vertices in $A$, and therefore less than $\\frac{n-1}{k}$.\n\n (4) Therefore, when we remove each edge adjacent to vertex $y$, each resulting connected component has less than $\\frac{n-1}{k}$ vertices. Since the degree of vertex $y$ is at most $k$, there are at most $k$ such components, and therefore the number of vertices excluding $y$ is less than $\\frac{n-1}{k} \\times k=n-1$, which is a contradiction.\n\n Therefore, the proof is complete. \\qed\n\n Now, let's prove the problem. First, let's look at the general properties of triangulation of a convex $n$-gon before looking at the convex $18n+2$-gon.\n\n <Step 1> Basic properties of triangulation of a convex polygon\n\n <Step 1.1> The sum of the interior angles of a convex $n$-gon is $(n-2) \\pi$. Therefore, in order for triangles with an interior angle sum of $\\pi$ to divide this sum, we need a total of $n-2$ triangles. Since each time we draw a diagonal, the division of the convex $n$-gon increases by one, we know that if we have divided a convex $n$-gon into $n-2$ triangles, we have drawn a total of $n-3$ diagonals. In summary, to triangulate a convex $n$-gon, we need to draw $n-3$ diagonals to divide it into $n-2$ triangles.\n\n <Step 1.2> If $n \\geq 4$, then there are $n-2$ triangles, and each triangle cannot have all 3 sides as sides of the convex $n$-gon. Therefore, there must be at least 2 triangles that share 2 sides with the convex $n$-gon.\n\n <Step 2> Mapping triangulation of a convex polygon to a tree\n\n The problem of dividing a convex $n$-gon $P$ into triangles is directly related to trees. For convenience, assume $n \\geq 4$. Let's consider the triangles as vertices and connect two vertices if the corresponding triangles share a side to draw a graph $G$.\n\n <Step 2.1> By <Step 1>, this graph has $n-2$ vertices and $n-3$ edges. (This is because each diagonal drawn during the division corresponds to one edge in $G$.)\n\n <Step 2.2> We can confirm that this graph $G$ is connected by mathematical induction. The case $n=4$ is trivial. Now, assume that $G$ is connected for triangulations of convex $n-1$-gons for $n \\geq 5$, and consider a triangulation $T$ of a convex $n$-gon $P$. By (2) of <Step 1>, this triangulation includes a triangle $X$ that has two consecutive sides of $P$.\n\n <Step 2.3> The vertex corresponding to this triangle $X$ has degree 1 in graph $G$. Let $Y$ be the vertex connected to $X$. Now, the remaining part of the $n$-gon $P$ excluding triangle $X$ is an $n-1$-gon $P^{\\prime}$, and if we remove triangle $X$ from triangulation $T$, the remaining part is $T^{\\prime}$, which is a triangulation of $P^{\\prime}$. Let $G^{\\prime}$ be the graph for this triangulation. Clearly, $G^{\\prime}$ is the graph obtained by removing vertex $X$ and edge $XY$ from $G$. By the inductive hypothesis, $G^{\\prime}$ is connected, so the graph $G$ obtained by adding edge $XY$ to it is also connected.\n\n In conclusion, graph $G$ is a connected graph with $n-2$ vertices and $n-3$ edges. Therefore, by -(B), $G$ is a tree.\n\n <Step 3> Analysis of the problem situation\n\n <Step 3.1> According to the above analysis, we can see that the triangulation given in the problem corresponds to a tree $T$ with $18n$ vertices. It is very important that the degree of each vertex in this tree is at most 3.\n\n <Step 3.2> Choosing two diagonals to divide the convex $18n+2$-gon can be thought of as removing two edges from this tree to divide it into three connected components. The question is whether we can do this so that the size of each connected component is at least $3n-1$ and at most $8n+1$.\n\n <Step 4> Solving the problem\n\n <Step 4.1> First, the tree $T$ corresponding to the triangulation has $18n$ vertices, and the degree of each vertex is at most 3. Therefore, by Lemma, we can remove one edge to make the sizes of the two resulting components at least $6n-1$.\n\n <Step 4.2> Let $A$ be the component with fewer vertices and $B$ be the component with more vertices (if the sizes are the same, assign $A$ and $B$ arbitrarily). The number of vertices in $A$ is at least $6n-1$ and at most $9n$, and the number of vertices in $B$ is at least $9n$ and at most $12n+1$.\n\n <Step 4.3> Since $B$ is also a tree with degree at most 3, we can apply again to $B$. By removing one edge from $B$, we can divide it into $B_{1}, B_{2}$ so that the size of each component is at least $\\frac{9n-1}{3}$ and at most $\\frac{2(12 n+1)+1}{3}=8 n+1$. Therefore, the sizes of $B_{1}, B_{2}$ are at least $3n$ and at most $8n+1$.\n\n <Step 4.4> Therefore, we can divide it into $A, B_{1}, B_{2}$.", "grading_guidelines": "(Partial)\n 1. Found a first diagonal that cuts the polygon into at least $3n$ triangles, or attempted an argument where an unbalanced cut can be modified to create a more balanced cut.\n 2. Successfully connected the triangulation with a tree.\n(Almost)\n 1. Established first cut diagonal as and in the solution attempts to successively apply the argument again on one of the sides, but with errors (e.g. not fulfilling the same hypotheses as the original cut).", "problem_id": "PB-Advanced-004", "level": "advanced", "category": "Combinatorics", "source": "Novel Problem", "max_score": 7, "difficulty": "IMO-easy", "short_answer": " "}12345678910#!/bin/sh# Reward measures structural submission validity only, not mathematical correctness.# External rubric-guided LLM judging against reference.json awards 0–7 points.# Offline, isolated Python; PROOF and VERIFIER_DIR allow local verification.set -euhere=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)export TESTS_DIR="$here" PROOF="${PROOF:-/app/proof.md}" VERIFIER_DIR="${VERIFIER_DIR:-/logs/verifier}"mkdir -p "$VERIFIER_DIR"printf '0\n' > "$VERIFIER_DIR/reward.txt"python3 -I -S "$here/grade_task.py"123456789101112# PB-Advanced-005
Solve the following problem using your own reasoning and local tools. Do not use web lookups or external models. Write a complete, self-contained, rigorous mathematical proof to `/app/proof.md`; create `/app` if necessary.
## Problem
Let $\angle XYZ$ be an acute angle with $\angle XYZ \ne 60^\circ$, and let $A$ be a point inside $\angle XYZ$. Prove that there exists $D\ne A$ inside $\angle XYZ$ and $\theta\in (0,2\pi )$ satisfying the following condition:
For points $B$ and $C$ on the rays $\overrightarrow{YX}$ and $\overrightarrow{YZ}$ respectively, then \[ \angle BAC = \angle XYZ \quad \implies \quad \angle BDC = \theta. \]123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163#!/bin/shset -euPROOF=${PROOF:-/app/proof.md}mkdir -p "$(dirname -- "$PROOF")"cat > "$PROOF" <<'IMO_PROOF_d4f40b51788db8b9eaf14b80be654d948279ff726f029f7cd5a014470b97b856'step 1: Construction of $D$ and $\theta$
step 1-1: Without loss of generality we may assume that $XA\perp YZ$ and $ZA\perp YX$.
step 1-2: Let $D$ be the circumcenter of $\triangle XYZ$.
step 1-3: Let $\theta=180^{\circ}-2\angle XYZ$.
\medskip{}
step 2: We prove that if $\angle BAC=\angle XYZ$, then $\angle BDC=\theta$.
\medskip{}
step 3: Lemma. A point $K$ inside a convex quadrilateral $PQRS$ has an isogonal conjugate with respect to the $PQRS$ if and only if $\angle PKQ+\angle RKS=180^{\circ}$.
\medskip{}
step 4: Proof of Lemma.
step 4-1: Let $H_{1},H_{2},H_{3},H_{4}$ be the feet of perpendicular from $K$ onto $PQ,QR,RS,SP$, respectively.
step 4-2: First assume that $K^{\prime}$ is the isogonal conjugate of $K$
step 4-2-1: Let $H_{1}^{\prime},H_{2}^{\prime},H_{3}^{\prime},H_{4}^{\prime}$ be the feet of perpendicular from $K^{\prime}$ onto $PQ,QR,RS,SP$, respectively.
step 4-2-2: We prove that $H_{1},H_{2},H_{1}^{\prime},H_{2}^{\prime}$ are cyclic.
step 4-2-2-1: We have $\angle KQH_{1}=\angle K^{\prime}QH_{2}^{\prime}$ by assumption.
step 4-2-2-2: We have $\angle KH_{1}Q=\angle K^{\prime}H_{2}^{\prime}Q=90^{\circ}$.
step 4-2-2-3: By steps 4-2-2-1 and 4-2-2-2, we have $\triangle KQH_{1}\sim\triangle K^{\prime}QH_{2}^{\prime}$.
step 4-2-2-4: Thus $QH_{1}:QH_{2}^{\prime}=KQ:K^{\prime}Q$.
step 4-2-2-5: Similarly $QH_{1}^{\prime}:QH_{2}=KQ:K^{\prime}Q$.
step 4-2-2-6: By steps 4-2-2-4 and 4-2-2-5, we have $QH_{1}\times QH_{1}^{\prime}=QH_{2}\times QH_{2}^{\prime}$.
step 4-2-2-7: Hence $H_{1},H_{2},H_{1}^{\prime},H_{2}^{\prime}$ are cyclic.
step 4-2-3: Denote $M$ as the midpoint of $KK^{\prime}$.
step 4-2-4: We prove that $H_{1},H_{1}^{\prime},H_{2},H_{2}^{\prime}$ are equidistant to $M$.
step 4-2-4-1: Let $N$ be the midpoint of $H_{1}H_{1}^{\prime}$.
step 4-2-4-2: Since $H_{1}K\parallel H_{1}^{\prime}K^{\prime}$ and both are perpendicular to $PQ$, we have $NM\perp PQ$.
step 4-2-4-3: Hence $M$ lies on the perpendicular bisector of $H_{1}H_{1}^{\prime}$.
step 4-2-4-4: Similarly $M$ lies on the perpendicular bisector of $H_{2}H_{2}^{\prime}$.
step 4-2-4-5: By steps 4-2-2, 4-2-4-3, 4-2-4-4 and the fact that $PQ$ and $QR$ are not parallel, we have that the center should be $M$.
step 4-2-5: Similarly $H_{2},H_{2}^{\prime},H_{3},H_{3}^{\prime}$ are equidistant to $M$, and $H_{3},H_{3}^{\prime},H_{4},H_{4}^{\prime}$ are equidistant to $M$.
step 4-2-6: By steps 4-2-4 and 4-2-5, $H_{1},H_{1}^{\prime},H_{2},H_{2}^{\prime},H_{3},H_{3}^{\prime},H_{4},H_{4}^{\prime}$ all lie on a circle centered at $M$.
step 4-2-7: Since $\angle KH_{1}Q=\angle KH_{2}Q=90^{\circ}$, $K,H_{1},Q,H_{2}$ are cyclic.
step 4-2-8: Similarly $K,H_{2},R,H_{3}$ are cyclic.
step 4-2-9: Similarly $K,H_{3},S,H_{4}$ are cyclic.
step 4-2-10: Similarly $K,H_{4},P,H_{1}$ are cyclic.
step 4-2-11: By steps 4-2-6, 4-2-7, 4-2-8, 4-2-9, and 4-2-10, we have \begin{align*} \angle PKQ+\angle RKS&=(\angle PKH_{1}+\angle QKH_{1})+(\angle RKH_{3}+\angle SKH_{3}) &=\angle PH_{4}H_{1}+\angle QH_{2}H_{1}+\angle RH_{2}H_{3}+\angle SH_{4}H_{3} &=360^{\circ}-(\angle H_{1}H_{2}H_{3}+\angle H_{3}H_{4}H_{1})=180^{\circ}. \end{align*} step 4-3: Assume $\angle PKQ+\angle RKS=180^{\circ}$.
step 4-3-1: By the same logic as in step 4-2, $H_{1},H_{2},H_{3},H_{4}$ lie on a circle $\omega$.
step 4-3-2: Let $O$ be the center of $\omega$.
step 4-3-3: Denote $J_{1},J_{2},J_{3},J_{4}$as the second intersection of $\omega$ and $PQ,QR,RS,SP$, respectively.
step 4-3-4: Let $K^{\prime}$ be the reflection of $K$ with respect to $O$.
step 4-3-5: Let $N^{\prime}$ be the midpoint of $H_{1}J_{1}$.
step 4-3-6: Since $KH_{1}\parallel ON^{\prime}$ and both are perpendicular to $PQ$, we have $K^{\prime}J_{1}\perp PQ$.
step 4-3-7: Similarly $K^{\prime}J_{2}\perp QR$.
step 4-3-8: Hence $\angle PQK=\angle H_{1}QK=90^{\circ}-\angle H_{1}KQ=90^{\circ}-\angle H_{1}H_{2}Q=90^{\circ}-\angle J_{2}J_{1}Q=\angle RQK^{\prime}$.
step 4-3-9: Similarly $K,K^{\prime}$ are isogonal with respect to all four angles of $PQRS$.
step 4-3-10: Thus $K^{\prime}$ is the isogonal conjugate of $K$ with respect to $PQRS$.\medskip{}
step 5: Now suppose $\angle BAC=\angle XYZ$.
step 5-1: Since $\angle XYZ$ is acute, $\triangle XYZ$ is acute, and $\angle XAY,\angle ZAY>90^{\circ}>\angle BAC$.
step 5-2: Hence $\square BCZX$ is convex, and $K$ is inside of $\square BCZX$.\medskip{}
step 6: We prove that $D$ is the isogonal conjugate of $A$ with respect to $\square BCZX$.
step 6-1: We have $\angle ZAX+\angle BAC=(180^{\circ}-\angle XYZ)+\angle XYZ=180^{\circ}$.
step 6-2: Hence by Lemma and steps 5-2, 6-1, $A$ has an isogonal conjugate with respect to $\square BCZX$.
step 6-3: $A,D$ are isogonal conjugates with respect to $\triangle XYZ$ as orthocenter and circumcenter.
step 6-4: By step 6-3, $XA,XD$ are isogonal lines with respect to $\angle BXZ$, and $ZA,ZD$ are isogonal lines with respect to $\angle CZX$.
step 6-5: By steps 6-2, 6-4, and the fact that there is at most one isogonal conjugate, we conclude that $D$ is indeed the isogonal conjugate.
\medskip{}
step 7: We prove that $\angle BDC=180^{\circ}-2\angle XYZ$.
step 7-1: By step 6, $A$ is the isogonal conjugate of $D$ with respect to $\square BCZX$.
step 7-2: By Lemma, we have $\angle BDC+\angle XDZ=180^{\circ}$.
step 7-3: Since $D$ is the circumcenter of $\triangle XYZ$, we have $\angle XDZ=2\angle XYZ$.
step 7-4: By step 7-2 and 7-3, we have $\angle BDC=180^{\circ}-2\angle XYZ$. step 7-5: Since $\angle XYZ \ne 60^\circ$, we have $D\ne A$.IMO_PROOF_d4f40b51788db8b9eaf14b80be654d948279ff726f029f7cd5a014470b97b8561234567891011121314151617181920schema_version = "1.4"artifacts = ["/app/proof.md"][task]name = "imo-proofbench/pb-advanced-005"version = "1.0.0"description = "IMO-ProofBench mathematical proof task"keywords = ["math", "proof", "imo"][metadata]problem_id = "PB-Advanced-005"level = "advanced"[agent]network_mode = "allowlist"timeout_sec = 3600[environment]docker_image = "docker.io/library/python:3.12-slim"cpus = 1memory_mb = 2048[verifier]network_mode = "allowlist"timeout_sec = 18012345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758"""Offline structural validation only; external rubric judge assigns 0–7 points."""import json, os, statLIMIT = 200_000
def read_own(path): """Reject links, special files, multiple hard links, and oversized files.""" parts = os.path.abspath(path).split('/')[1:] folder = os.open('/', os.O_RDONLY | os.O_DIRECTORY) try: for part in parts[:-1]: inner = os.open(part, os.O_RDONLY | os.O_DIRECTORY | os.O_NOFOLLOW, dir_fd=folder) os.close(folder) folder = inner fd = os.open(parts[-1], os.O_RDONLY | os.O_NOFOLLOW | os.O_NONBLOCK, dir_fd=folder) finally: os.close(folder) with os.fdopen(fd, 'rb') as stream: info = os.fstat(stream.fileno()) if not stat.S_ISREG(info.st_mode) or info.st_nlink != 1: raise ValueError('not a regular file with one link') data = stream.read(LIMIT + 1) if len(data) > LIMIT: raise ValueError('file exceeds 200000 bytes') return data
def write_new(path, data): try: os.unlink(path) except FileNotFoundError: pass fd = os.open(path, os.O_WRONLY | os.O_CREAT | os.O_EXCL | os.O_NOFOLLOW, 0o644) with os.fdopen(fd, 'wb') as f: f.write(data)
def main(): out = os.environ['VERIFIER_DIR'] os.makedirs(out, exist_ok=True) write_new(os.path.join(out, 'reward.txt'), b'0\n') proof_path = os.path.join(out, 'proof.md') try: os.unlink(proof_path) except FileNotFoundError: pass reference = open(os.path.join(os.environ['TESTS_DIR'], 'reference.json'), 'rb').read() json.loads(reference) write_new(os.path.join(out, 'reference.json'), reference) status, count, reason = 'missing', 0, 'proof unavailable or invalid' try: raw = read_own(os.environ['PROOF']) proof = raw.decode('utf-8', 'strict') count = len(proof) write_new(proof_path, raw) if sum(not c.isspace() for c in proof) < 20: status, reason = 'empty', 'fewer than 20 non-whitespace characters' else: status, reason = 'submitted_for_judge', 'structurally valid submission' except (OSError, ValueError, UnicodeError) as e: reason = 'proof unavailable or invalid: ' + str(e)[:200] result = {'status': status, 'char_count': count, 'requires_llm_judge': True, 'max_score': 7, 'reason': reason} write_new(os.path.join(out, 'grade.json'), (json.dumps(result, ensure_ascii=False, indent=2)+'\n').encode()) if status == 'submitted_for_judge': write_new(os.path.join(out, 'reward.txt'), b'1\n') print(status, 'structural reward:', int(status == 'submitted_for_judge'))if __name__ == '__main__': main()123456789101112{ "problem": "Let $\\angle XYZ$ be an acute angle with $\\angle XYZ \\ne 60^\\circ$, and let $A$ be a point inside $\\angle XYZ$. Prove that there exists $D\\ne A$ inside $\\angle XYZ$ and $\\theta\\in (0,2\\pi )$ satisfying the following condition:\n\n For points $B$ and $C$ on the rays $\\overrightarrow{YX}$ and $\\overrightarrow{YZ}$ respectively, then\n \\[\n \\angle BAC = \\angle XYZ \\quad \\implies \\quad \\angle BDC = \\theta.\n \\]", "solution": "step 1: Construction of $D$ and $\\theta$\n\n step 1-1: Without loss of generality we may assume that $XA\\perp YZ$\n and $ZA\\perp YX$.\n\n step 1-2: Let $D$ be the circumcenter of $\\triangle XYZ$.\n\n step 1-3: Let $\\theta=180^{\\circ}-2\\angle XYZ$.\n\n \\medskip{}\n\n step 2: We prove that if $\\angle BAC=\\angle XYZ$, then $\\angle BDC=\\theta$.\n\n \\medskip{}\n\n step 3: Lemma. A point $K$ inside a convex quadrilateral $PQRS$\n has an isogonal conjugate with respect to the $PQRS$ if and only\n if $\\angle PKQ+\\angle RKS=180^{\\circ}$.\n\n \\medskip{}\n\n step 4: Proof of Lemma.\n\n step 4-1: Let $H_{1},H_{2},H_{3},H_{4}$ be the feet of perpendicular\n from $K$ onto $PQ,QR,RS,SP$, respectively.\n\n step 4-2: First assume that $K^{\\prime}$ is the isogonal conjugate\n of $K$\n\n step 4-2-1: Let $H_{1}^{\\prime},H_{2}^{\\prime},H_{3}^{\\prime},H_{4}^{\\prime}$\n be the feet of perpendicular from $K^{\\prime}$ onto $PQ,QR,RS,SP$,\n respectively.\n\n step 4-2-2: We prove that $H_{1},H_{2},H_{1}^{\\prime},H_{2}^{\\prime}$\n are cyclic.\n\n step 4-2-2-1: We have $\\angle KQH_{1}=\\angle K^{\\prime}QH_{2}^{\\prime}$\n by assumption.\n\n step 4-2-2-2: We have $\\angle KH_{1}Q=\\angle K^{\\prime}H_{2}^{\\prime}Q=90^{\\circ}$.\n\n step 4-2-2-3: By steps 4-2-2-1 and 4-2-2-2, we have $\\triangle KQH_{1}\\sim\\triangle K^{\\prime}QH_{2}^{\\prime}$.\n\n step 4-2-2-4: Thus $QH_{1}:QH_{2}^{\\prime}=KQ:K^{\\prime}Q$.\n\n step 4-2-2-5: Similarly $QH_{1}^{\\prime}:QH_{2}=KQ:K^{\\prime}Q$.\n\n step 4-2-2-6: By steps 4-2-2-4 and 4-2-2-5, we have $QH_{1}\\times QH_{1}^{\\prime}=QH_{2}\\times QH_{2}^{\\prime}$.\n\n step 4-2-2-7: Hence $H_{1},H_{2},H_{1}^{\\prime},H_{2}^{\\prime}$ are\n cyclic.\n\n step 4-2-3: Denote $M$ as the midpoint of $KK^{\\prime}$.\n\n step 4-2-4: We prove that $H_{1},H_{1}^{\\prime},H_{2},H_{2}^{\\prime}$\n are equidistant to $M$.\n\n step 4-2-4-1: Let $N$ be the midpoint of $H_{1}H_{1}^{\\prime}$.\n\n step 4-2-4-2: Since $H_{1}K\\parallel H_{1}^{\\prime}K^{\\prime}$ and\n both are perpendicular to $PQ$, we have $NM\\perp PQ$.\n\n step 4-2-4-3: Hence $M$ lies on the perpendicular bisector of $H_{1}H_{1}^{\\prime}$.\n\n step 4-2-4-4: Similarly $M$ lies on the perpendicular bisector of\n $H_{2}H_{2}^{\\prime}$.\n\n step 4-2-4-5: By steps 4-2-2, 4-2-4-3, 4-2-4-4 and the fact that $PQ$\n and $QR$ are not parallel, we have that the center should be $M$.\n\n step 4-2-5: Similarly $H_{2},H_{2}^{\\prime},H_{3},H_{3}^{\\prime}$\n are equidistant to $M$, and $H_{3},H_{3}^{\\prime},H_{4},H_{4}^{\\prime}$\n are equidistant to $M$.\n\n step 4-2-6: By steps 4-2-4 and 4-2-5, $H_{1},H_{1}^{\\prime},H_{2},H_{2}^{\\prime},H_{3},H_{3}^{\\prime},H_{4},H_{4}^{\\prime}$\n all lie on a circle centered at $M$.\n\n step 4-2-7: Since $\\angle KH_{1}Q=\\angle KH_{2}Q=90^{\\circ}$, $K,H_{1},Q,H_{2}$\n are cyclic.\n\n step 4-2-8: Similarly $K,H_{2},R,H_{3}$ are cyclic.\n\n step 4-2-9: Similarly $K,H_{3},S,H_{4}$ are cyclic.\n\n step 4-2-10: Similarly $K,H_{4},P,H_{1}$ are cyclic.\n\n step 4-2-11: By steps 4-2-6, 4-2-7, 4-2-8, 4-2-9, and 4-2-10, we have\n \\begin{align*}\n \\angle PKQ+\\angle RKS&=(\\angle PKH_{1}+\\angle QKH_{1})+(\\angle RKH_{3}+\\angle SKH_{3})\n &=\\angle PH_{4}H_{1}+\\angle QH_{2}H_{1}+\\angle RH_{2}H_{3}+\\angle SH_{4}H_{3}\n &=360^{\\circ}-(\\angle H_{1}H_{2}H_{3}+\\angle H_{3}H_{4}H_{1})=180^{\\circ}.\n \\end{align*}\n step 4-3: Assume $\\angle PKQ+\\angle RKS=180^{\\circ}$.\n\n step 4-3-1: By the same logic as in step 4-2, $H_{1},H_{2},H_{3},H_{4}$ lie on a circle $\\omega$.\n\n step 4-3-2: Let $O$ be the center of $\\omega$.\n\n step 4-3-3: Denote $J_{1},J_{2},J_{3},J_{4}$as the second intersection\n of $\\omega$ and $PQ,QR,RS,SP$, respectively.\n\n step 4-3-4: Let $K^{\\prime}$ be the reflection of $K$ with respect\n to $O$.\n\n step 4-3-5: Let $N^{\\prime}$ be the midpoint of $H_{1}J_{1}$.\n\n step 4-3-6: Since $KH_{1}\\parallel ON^{\\prime}$ and both are perpendicular\n to $PQ$, we have $K^{\\prime}J_{1}\\perp PQ$.\n\n step 4-3-7: Similarly $K^{\\prime}J_{2}\\perp QR$.\n\n step 4-3-8: Hence $\\angle PQK=\\angle H_{1}QK=90^{\\circ}-\\angle H_{1}KQ=90^{\\circ}-\\angle H_{1}H_{2}Q=90^{\\circ}-\\angle J_{2}J_{1}Q=\\angle RQK^{\\prime}$.\n\n step 4-3-9: Similarly $K,K^{\\prime}$ are isogonal with respect to\n all four angles of $PQRS$.\n\n step 4-3-10: Thus $K^{\\prime}$ is the isogonal conjugate of $K$\n with respect to $PQRS$.\\medskip{}\n\n step 5: Now suppose $\\angle BAC=\\angle XYZ$.\n\n step 5-1: Since $\\angle XYZ$ is acute, $\\triangle XYZ$ is acute,\n and $\\angle XAY,\\angle ZAY>90^{\\circ}>\\angle BAC$.\n\n step 5-2: Hence $\\square BCZX$ is convex, and $K$ is inside of $\\square BCZX$.\\medskip{}\n\n step 6: We prove that $D$ is the isogonal conjugate of $A$ with\n respect to $\\square BCZX$.\n\n step 6-1: We have $\\angle ZAX+\\angle BAC=(180^{\\circ}-\\angle XYZ)+\\angle XYZ=180^{\\circ}$.\n\n step 6-2: Hence by Lemma and steps 5-2, 6-1, $A$ has an isogonal\n conjugate with respect to $\\square BCZX$.\n\n step 6-3: $A,D$ are isogonal conjugates with respect to $\\triangle XYZ$\n as orthocenter and circumcenter.\n\n step 6-4: By step 6-3, $XA,XD$ are isogonal lines with respect to\n $\\angle BXZ$, and $ZA,ZD$ are isogonal lines with respect to $\\angle CZX$.\n\n step 6-5: By steps 6-2, 6-4, and the fact that there is at most one\n isogonal conjugate, we conclude that $D$ is indeed the isogonal conjugate.\n\n \\medskip{}\n\n step 7: We prove that $\\angle BDC=180^{\\circ}-2\\angle XYZ$.\n\n step 7-1: By step 6, $A$ is the isogonal conjugate of $D$ with respect\n to $\\square BCZX$.\n\n step 7-2: By Lemma, we have $\\angle BDC+\\angle XDZ=180^{\\circ}$.\n\n step 7-3: Since $D$ is the circumcenter of $\\triangle XYZ$, we have\n $\\angle XDZ=2\\angle XYZ$.\n\n step 7-4: By step 7-2 and 7-3, we have $\\angle BDC=180^{\\circ}-2\\angle XYZ$.\n step 7-5: Since $\\angle XYZ \\ne 60^\\circ$, we have $D\\ne A$.", "grading_guidelines": "(Partial)\n 1. Constructed $D$ and found $\\theta$ correctly.\n 2. Found the necessary and sufficient conditions for the existence of isogonal conjugate in quadrilateral.\n(Almost)\n 1. Verification contains minor mistakes only.", "problem_id": "PB-Advanced-005", "level": "advanced", "category": "Geometry", "source": "Novel Problem", "max_score": 7, "difficulty": "IMO-medium", "short_answer": " "}12345678910#!/bin/sh# Reward measures structural submission validity only, not mathematical correctness.# External rubric-guided LLM judging against reference.json awards 0–7 points.# Offline, isolated Python; PROOF and VERIFIER_DIR allow local verification.set -euhere=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)export TESTS_DIR="$here" PROOF="${PROOF:-/app/proof.md}" VERIFIER_DIR="${VERIFIER_DIR:-/logs/verifier}"mkdir -p "$VERIFIER_DIR"printf '0\n' > "$VERIFIER_DIR/reward.txt"python3 -I -S "$here/grade_task.py"123456789101112# PB-Advanced-006
Solve the following problem using your own reasoning and local tools. Do not use web lookups or external models. Write a complete, self-contained, rigorous mathematical proof to `/app/proof.md`; create `/app` if necessary.
## Problem
Find all functions$f:\mathbb{Z}\rightarrow\mathbb{Z}$ such that the equation \[ f(x-f(xy))=f(x)f(1-y) \] holds for all $x,y\in\mathbb{Z}$.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145#!/bin/shset -euPROOF=${PROOF:-/app/proof.md}mkdir -p "$(dirname -- "$PROOF")"cat > "$PROOF" <<'IMO_PROOF_763fd2531c3da0ca00ad910f3e70d7271b0ecfdaf99ff4dcb16a7857394d7ada'Let $P(x,y)$ be the assertion $f(x-f(xy))=f(x)f(1-y)$.
If $f$ is constant, $f\equiv0$ or $f\equiv1$. From now on we will only consider non-constant functions.
Claim 1 $f(f(x))=f(x)$ for all $x\in\mathbb{Z}$
Proof. $P(0,y):f(-f(0))=f(0)f(1-y)\Longrightarrow f(0)=0$
$P(x,0):f(x)=f(x)f(1)\Longrightarrow f(1)=1$
$P(1,y):f(1-f(y))=f(1-y)$
$P(1,1-y):f(1-f(1-y))=f(y)$
$P(1,1-f(y)):f(y)=f(1-f(1-y))=f(1-f(1-f(y)))=f(f(y))\Longrightarrow f(f(x))=f(x)\forall x\in\mathbb{Z}\blacksquare$
$\Longrightarrow P(x,1):f(x-f(x))=0$
Now consider $f(\mathbb{Z})$.
Case 1 $f(\mathbb{Z})\subset\{-1,0,1\}$
Case 1.1. $f(\mathbb{Z})=\{0,1\}$
We have $f(x)=1\textbackslash \Longrightarrow f(x-1)=0\textbackslash \Longrightarrow f(2-x)=1 \textbackslash \Longrightarrow f(1-x)=0$ and $f(1-x)=0 \textbackslash \Longrightarrow f(x)=1$
\[ \therefore f(x)=1\Longleftrightarrow f(x-1)=0\Longleftrightarrow f(2-x)=1\Longleftrightarrow f(1-x)=0 \] We can inductively prove that $f(x)=\begin{cases} 0 & 2|x
1 & 2\nmid x \end{cases}$
Case 1.2. $f(\mathbb{Z})=\{-1,0,1\}\Longrightarrow f(-1)=-1$
$P(1,x)$ and $P(-1,x)$ gives
\begin{align*} f(x)=1 & \Longrightarrow f(1-x)=0,f(x+1)=-f(-2)
f(x)=0 & \Longrightarrow f(1-x)=1,f(x+1)=1
f(x)=-1 & \Longrightarrow f(1-x)=f(2),f(x+1)=0 \end{align*} It's easy to see that $f(-2)=1,f(2)=-1$, and using this, we can inductively prove that $f(x)=\begin{cases} 0 & 3|x
1 & 3|x-1
-1 & 3|x+1 \end{cases}$
Case 2. $f(\mathbb{Z})$ is not a subset of $\{-1,0,1\}$
Case 2.1 $f(t)=1$ for some $2\mid t$
\[ P(2,\frac{t}{2}):1=f(1)=f(2)f(1-\frac{t}{2}) \]
Case 2.1.1 : $f(2)=1\Longrightarrow P(2,1):1=f(2)f(0)=0$. Contradiction!
Case 2.1.2 : $f(2)=-1\Longrightarrow f(-1)=-1,f(1-\frac{t}{2})=-1$
$P(-1,-x):f(-1-f(x))=-f(1+x)$
$P(-1,-f(x)):f(-1-f(x))=f(-1-f(f(x)))=-f(1+f(x))\Longrightarrow f(1+x)=f(1+f(x))...(*)$
Since $f(2)=-1$, so plugging this in $(*)$, we have
\[ f(2)=-1\Longrightarrow f(3)=0\Longrightarrow f(4)=1\Longrightarrow f(5)=-1\cdots \] We can prove inductively that$f(x)=\begin{cases} 0 & 3|x
1 & 3|x-1
-1 & 3|x+1 \end{cases}$ for all $x\in\mathbb{N}$.
Plugging in $x=-1,y=-n(n\in\mathbb{N})$ gives $f(-1-n)=f(-1-f(n))=-f(1+n)$, so we have $f(x)=\begin{cases} 0 & 3|x
1 & 3|x-1
-1 & 3|x+1 \end{cases}$for all $x$, so contradiction since $f(\mathbb{Z})\in\{-1,0,1\}$.
Case 2.2 $f(t)=1\Longrightarrow2\nmid t$
Claim 2 $f(-1)=-1$ or $f(2)=0$
Proof. Assume that $f(2)\neq0$
We will prove that $f(t)=1\Longrightarrow f(1-t)=0$. $P(2,\frac{1-t}{2})$ gives
\[ f(2)=f(2)f(\frac{t-3}{2})\Longrightarrow f(\frac{t-3}{2})=1 \] We repeat this, then we get $t\equiv1(mod2^{n})$ for all $n\Longrightarrow t=1$. Note that
\[ f(-1)=c\Longrightarrow f(-1-c)=0\Longrightarrow f(c+2)=1 \] Hence we conclude that $c=-1$.
Case 2.2.1. $f(2)=0\Longrightarrow f(-1)=1$
Define $n$ as the element of $f(\mathbb{Z})-\{-1,0,1\}$ which has the smallest absolute value. Then we have
\[ f(x-f(xy))=n\Longrightarrow\{f(x),f(1-y)\}=\{1,n\}\text{ or }\{f(x),f(1-y)\}=\{-1,-n\}...(\star) \] . Also note that $P(-n,- 1):f(-n-f(n))=0$, where $f(n)=n$ by Claim 1. Thus by $x=n,y=-2$ $(\star)\Longrightarrow f(3)=1$. Case 2.2.1. now becomes a repetition of Case 1.1, so contradiction!
Case 2.2.2. $f(2)\neq0,f(-1)=-1,f(-2)=-f(2)$
Claim 3 $f(n)=t\Longrightarrow n=t\forall t\leq1$
Proof. We use induction on $t$. $t=1$ is already proven above. Assume that $t$ works.
If $f(n)=t-1\Longrightarrow f(1+n)=f(1+f(n))=f(t)\Longrightarrow n=t-1$, so we're done.
Use the same method to prove that $f(n)=n\forall n\leq1$, and $P(-1,n)(n>0)$ gives $f(n+1)=-f(-n-1)=n+1$, so $f(n)=n$ for all $n\in\mathbb{Z}$.IMO_PROOF_763fd2531c3da0ca00ad910f3e70d7271b0ecfdaf99ff4dcb16a7857394d7ada1234567891011121314151617181920schema_version = "1.4"artifacts = ["/app/proof.md"][task]name = "imo-proofbench/pb-advanced-006"version = "1.0.0"description = "IMO-ProofBench mathematical proof task"keywords = ["math", "proof", "imo"][metadata]problem_id = "PB-Advanced-006"level = "advanced"[agent]network_mode = "allowlist"timeout_sec = 3600[environment]docker_image = "docker.io/library/python:3.12-slim"cpus = 1memory_mb = 2048[verifier]network_mode = "allowlist"timeout_sec = 18012345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758"""Offline structural validation only; external rubric judge assigns 0–7 points."""import json, os, statLIMIT = 200_000
def read_own(path): """Reject links, special files, multiple hard links, and oversized files.""" parts = os.path.abspath(path).split('/')[1:] folder = os.open('/', os.O_RDONLY | os.O_DIRECTORY) try: for part in parts[:-1]: inner = os.open(part, os.O_RDONLY | os.O_DIRECTORY | os.O_NOFOLLOW, dir_fd=folder) os.close(folder) folder = inner fd = os.open(parts[-1], os.O_RDONLY | os.O_NOFOLLOW | os.O_NONBLOCK, dir_fd=folder) finally: os.close(folder) with os.fdopen(fd, 'rb') as stream: info = os.fstat(stream.fileno()) if not stat.S_ISREG(info.st_mode) or info.st_nlink != 1: raise ValueError('not a regular file with one link') data = stream.read(LIMIT + 1) if len(data) > LIMIT: raise ValueError('file exceeds 200000 bytes') return data
def write_new(path, data): try: os.unlink(path) except FileNotFoundError: pass fd = os.open(path, os.O_WRONLY | os.O_CREAT | os.O_EXCL | os.O_NOFOLLOW, 0o644) with os.fdopen(fd, 'wb') as f: f.write(data)
def main(): out = os.environ['VERIFIER_DIR'] os.makedirs(out, exist_ok=True) write_new(os.path.join(out, 'reward.txt'), b'0\n') proof_path = os.path.join(out, 'proof.md') try: os.unlink(proof_path) except FileNotFoundError: pass reference = open(os.path.join(os.environ['TESTS_DIR'], 'reference.json'), 'rb').read() json.loads(reference) write_new(os.path.join(out, 'reference.json'), reference) status, count, reason = 'missing', 0, 'proof unavailable or invalid' try: raw = read_own(os.environ['PROOF']) proof = raw.decode('utf-8', 'strict') count = len(proof) write_new(proof_path, raw) if sum(not c.isspace() for c in proof) < 20: status, reason = 'empty', 'fewer than 20 non-whitespace characters' else: status, reason = 'submitted_for_judge', 'structurally valid submission' except (OSError, ValueError, UnicodeError) as e: reason = 'proof unavailable or invalid: ' + str(e)[:200] result = {'status': status, 'char_count': count, 'requires_llm_judge': True, 'max_score': 7, 'reason': reason} write_new(os.path.join(out, 'grade.json'), (json.dumps(result, ensure_ascii=False, indent=2)+'\n').encode()) if status == 'submitted_for_judge': write_new(os.path.join(out, 'reward.txt'), b'1\n') print(status, 'structural reward:', int(status == 'submitted_for_judge'))if __name__ == '__main__': main()123456789101112{ "problem": "Find all functions$f:\\mathbb{Z}\\rightarrow\\mathbb{Z}$\n such that the equation\n \\[\n f(x-f(xy))=f(x)f(1-y)\n \\]\n holds for all $x,y\\in\\mathbb{Z}$.", "solution": "Let $P(x,y)$ be the assertion $f(x-f(xy))=f(x)f(1-y)$.\n\n If $f$ is constant, $f\\equiv0$ or $f\\equiv1$. From now on we will\n only consider non-constant functions.\n\n Claim 1 $f(f(x))=f(x)$ for all $x\\in\\mathbb{Z}$\n\n Proof. $P(0,y):f(-f(0))=f(0)f(1-y)\\Longrightarrow f(0)=0$\n\n $P(x,0):f(x)=f(x)f(1)\\Longrightarrow f(1)=1$\n\n $P(1,y):f(1-f(y))=f(1-y)$\n\n $P(1,1-y):f(1-f(1-y))=f(y)$\n\n $P(1,1-f(y)):f(y)=f(1-f(1-y))=f(1-f(1-f(y)))=f(f(y))\\Longrightarrow f(f(x))=f(x)\\forall x\\in\\mathbb{Z}\\blacksquare$\n\n $\\Longrightarrow P(x,1):f(x-f(x))=0$\n\n Now consider $f(\\mathbb{Z})$.\n\n Case 1 $f(\\mathbb{Z})\\subset\\{-1,0,1\\}$\n\n Case 1.1. $f(\\mathbb{Z})=\\{0,1\\}$\n\n We have $f(x)=1\\textbackslash \\Longrightarrow f(x-1)=0\\textbackslash \\Longrightarrow\n f(2-x)=1 \\textbackslash \\Longrightarrow f(1-x)=0$ and $f(1-x)=0\n \\textbackslash \\Longrightarrow f(x)=1$\n\n \\[\n \\therefore f(x)=1\\Longleftrightarrow f(x-1)=0\\Longleftrightarrow f(2-x)=1\\Longleftrightarrow f(1-x)=0\n \\]\n We can inductively prove that $f(x)=\\begin{cases}\n 0 & 2|x\n\n 1 & 2\\nmid x\n \\end{cases}$\n\n Case 1.2. $f(\\mathbb{Z})=\\{-1,0,1\\}\\Longrightarrow f(-1)=-1$\n\n $P(1,x)$ and $P(-1,x)$ gives\n\n \\begin{align*}\n f(x)=1 & \\Longrightarrow f(1-x)=0,f(x+1)=-f(-2)\n\n f(x)=0 & \\Longrightarrow f(1-x)=1,f(x+1)=1\n\n f(x)=-1 & \\Longrightarrow f(1-x)=f(2),f(x+1)=0\n \\end{align*}\n It's easy to see that $f(-2)=1,f(2)=-1$, and using this, we can inductively\n prove that $f(x)=\\begin{cases}\n 0 & 3|x\n\n 1 & 3|x-1\n\n -1 & 3|x+1\n \\end{cases}$\n\n Case 2. $f(\\mathbb{Z})$ is not a subset of $\\{-1,0,1\\}$\n\n Case 2.1 $f(t)=1$ for some $2\\mid t$\n\n \\[\n P(2,\\frac{t}{2}):1=f(1)=f(2)f(1-\\frac{t}{2})\n \\]\n\n Case 2.1.1 : $f(2)=1\\Longrightarrow P(2,1):1=f(2)f(0)=0$. Contradiction!\n\n Case 2.1.2 : $f(2)=-1\\Longrightarrow f(-1)=-1,f(1-\\frac{t}{2})=-1$\n\n $P(-1,-x):f(-1-f(x))=-f(1+x)$\n\n $P(-1,-f(x)):f(-1-f(x))=f(-1-f(f(x)))=-f(1+f(x))\\Longrightarrow f(1+x)=f(1+f(x))...(*)$\n\n Since $f(2)=-1$, so plugging this in $(*)$, we have\n\n \\[\n f(2)=-1\\Longrightarrow f(3)=0\\Longrightarrow f(4)=1\\Longrightarrow f(5)=-1\\cdots\n \\]\n We can prove inductively that$f(x)=\\begin{cases}\n 0 & 3|x\n\n 1 & 3|x-1\n\n -1 & 3|x+1\n \\end{cases}$ for all $x\\in\\mathbb{N}$.\n\n Plugging in $x=-1,y=-n(n\\in\\mathbb{N})$ gives $f(-1-n)=f(-1-f(n))=-f(1+n)$,\n so we have $f(x)=\\begin{cases}\n 0 & 3|x\n\n 1 & 3|x-1\n\n -1 & 3|x+1\n \\end{cases}$for all $x$, so contradiction since $f(\\mathbb{Z})\\in\\{-1,0,1\\}$.\n\n Case 2.2 $f(t)=1\\Longrightarrow2\\nmid t$\n\n Claim 2 $f(-1)=-1$ or $f(2)=0$\n\n Proof. Assume that $f(2)\\neq0$\n\n We will prove that $f(t)=1\\Longrightarrow f(1-t)=0$. $P(2,\\frac{1-t}{2})$\n gives\n\n \\[\n f(2)=f(2)f(\\frac{t-3}{2})\\Longrightarrow f(\\frac{t-3}{2})=1\n \\]\n We repeat this, then we get $t\\equiv1(mod2^{n})$ for all $n\\Longrightarrow t=1$.\n Note that\n\n \\[\n f(-1)=c\\Longrightarrow f(-1-c)=0\\Longrightarrow f(c+2)=1\n \\]\n Hence we conclude that $c=-1$.\n\n Case 2.2.1. $f(2)=0\\Longrightarrow f(-1)=1$\n\n Define $n$ as the element of $f(\\mathbb{Z})-\\{-1,0,1\\}$ which has\n the smallest absolute value. Then we have\n\n \\[\n f(x-f(xy))=n\\Longrightarrow\\{f(x),f(1-y)\\}=\\{1,n\\}\\text{ or }\\{f(x),f(1-y)\\}=\\{-1,-n\\}...(\\star)\n \\]\n . Also note that $P(-n,- 1):f(-n-f(n))=0$, where $f(n)=n$ by Claim 1. Thus by $x=n,y=-2$ $(\\star)\\Longrightarrow f(3)=1$.\n Case 2.2.1. now becomes a repetition of Case 1.1, so contradiction!\n\n Case 2.2.2. $f(2)\\neq0,f(-1)=-1,f(-2)=-f(2)$\n\n Claim 3 $f(n)=t\\Longrightarrow n=t\\forall t\\leq1$\n\n Proof. We use induction on $t$. $t=1$ is already proven above. Assume\n that $t$ works.\n\n If $f(n)=t-1\\Longrightarrow f(1+n)=f(1+f(n))=f(t)\\Longrightarrow n=t-1$,\n so we're done.\n\n Use the same method to prove that $f(n)=n\\forall n\\leq1$, and $P(-1,n)(n>0)$\n gives $f(n+1)=-f(-n-1)=n+1$, so $f(n)=n$ for all $n\\in\\mathbb{Z}$.", "grading_guidelines": "(Partial)\n 1. Proved $f(f(x))=f(x)$.\n 2. Handled the case where $f\\subseteq \\{-1, 0, 1\\}$.\n 3. Handled the case where $f\\not \\subset \\{-1, 0, 1\\}$.\n(Almost)\n 1. Verification contains minor mistakes only.", "problem_id": "PB-Advanced-006", "level": "advanced", "category": "Algebra", "source": "Novel Problem", "max_score": 7, "difficulty": "IMO-hard", "short_answer": "$f_{1}(x)\\equiv0$, $f_{2}(x)\\equiv1$,\n$f_{3}(x)\\equiv x$, $f_{4}(x)=\\begin{cases}\n0, & x=2n\\\\\n1, & x=2n+1\n\\end{cases}$, where $n\\in\\mathbb{Z}$, $f_{5}(x)=\\begin{cases}\n0, & x=3n\\\\\n1, & x=3n+1\\\\\n-1, & x=3n+2\n\\end{cases}$, where $n\\in\\mathbb{Z}$"}12345678910#!/bin/sh# Reward measures structural submission validity only, not mathematical correctness.# External rubric-guided LLM judging against reference.json awards 0–7 points.# Offline, isolated Python; PROOF and VERIFIER_DIR allow local verification.set -euhere=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)export TESTS_DIR="$here" PROOF="${PROOF:-/app/proof.md}" VERIFIER_DIR="${VERIFIER_DIR:-/logs/verifier}"mkdir -p "$VERIFIER_DIR"printf '0\n' > "$VERIFIER_DIR/reward.txt"python3 -I -S "$here/grade_task.py"12345678910111213# PB-Advanced-007
Solve the following problem using your own reasoning and local tools. Do not use web lookups or external models. Write a complete, self-contained, rigorous mathematical proof to `/app/proof.md`; create `/app` if necessary.
## Problem
Prove that there exist two real-coefficient polynomials $P(x)$ and $Q(x)$ satisfying the following condition:
(Condition) The degree of the polynomial $P(x)$ is at least 2024, the degree of $Q(x)$ is at least 2, and for any real number $x$, the following holds:
\[ P(Q(x)-x-1)=Q(P(x)) \]123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051#!/bin/shset -euPROOF=${PROOF:-/app/proof.md}mkdir -p "$(dirname -- "$PROOF")"cat > "$PROOF" <<'IMO_PROOF_a9aad31a8bdf1311c6dc42d44c11086264b96b4610a037c6d6afa3a8fbd3831c'<Step 1> Checking the possibility of recursive construction using induction
<Step 1.1> Let's assume that two polynomials $P_{0}$ and $Q_{0}$ satisfy the polynomial equation given in the problem as follows:
\[ P_{0}\left(Q_{0}(x)-x-1\right)=Q_{0}\left(P_{0}(x)\right) \]
<Step 1.2> For a positive integer $n$, let's define the polynomial $P_{n}(x)$ recursively as follows:
\[ P_{n}(x)=P_{n-1}\left(Q_{0}(x)-x-1\right); n \geq 1 \]
<Step 1.3> Let's prove by mathematical induction that for any non-negative integer $n$, $(P_{n}, Q_{0})$ also satisfies the given polynomial equation.
*(1)* First, we have already confirmed that the case $n=0$ holds.
*(2)* Next, let's assume that the case $n=k$ holds, i.e., assume that $(P_{k}, Q_{0})$ is also a solution to the polynomial equation. Then, by the induction hypothesis and the recursive formula for $P_{n}$ defined above, we have
\[ P_{k+1}(x)=P_{k}\left(Q_{0}(x)-x-1\right)=Q_{0}\left(P_{k}(x)\right) \]
Now, substituting $x=Q_{0}(y)-y-1$, we get
\[ P_{k+1}\left(Q_{0}(y)-y-1\right)=Q_{0}\left(P_{k}\left(Q_{0}(y)-y-1\right)\right)=Q_{0}\left(P_{k+1}(y)\right) \]
Therefore, we can see that the proposition holds for the case $n=k+1$.
<Step 2> Initialization
<Step 2.1> As we saw in <Step 1>, if we find an initial solution $(P_{0}, Q_{0})$, we can continuously generate solutions. In particular, looking at the recursive formula for $P_{n}$, if the degree of $Q_{0}$ is at least 2, the degree of $P_{n}$ is twice the degree of $P_{n-1}$, which continuously increases. Therefore, by repeating this process, we can eventually make the degree of $P_{n}$ greater than 2024.
<Step 2.2> Therefore, to find an initial solution, let's first try $P_{0}$ as a linear polynomial and $Q_{0}$ as a quadratic polynomial. It is easy to see that there are no possible cases. If both $P_{0}$ and $Q_{0}$ are quadratic polynomials, substituting $P_{0}(x)=ax^{2}+bx+c$, $Q_{0}(x)=ux^{2}+vx+w$ and using the method of undetermined coefficients, we find that
\[ P_{0}(x)=x^{2}+\frac{5}{2} x, \quad Q_{0}(x)=x^{2}+\frac{7}{2} x+\frac{3}{2} \]
is a solution to the polynomial equation $P_{0}\left(Q_{0}(x)-x-1\right)=Q_{0}\left(P_{0}(x)\right)$.
<Step 2.3> Now, repeating <Step 1> based on this initial solution, $(P_{n}, Q_{0})$ is also a solution for any $n$, and in particular, the degree of $P_{11}$ is 2048, which is greater than 2024.IMO_PROOF_a9aad31a8bdf1311c6dc42d44c11086264b96b4610a037c6d6afa3a8fbd3831c1234567891011121314151617181920schema_version = "1.4"artifacts = ["/app/proof.md"][task]name = "imo-proofbench/pb-advanced-007"version = "1.0.0"description = "IMO-ProofBench mathematical proof task"keywords = ["math", "proof", "imo"][metadata]problem_id = "PB-Advanced-007"level = "advanced"[agent]network_mode = "allowlist"timeout_sec = 3600[environment]docker_image = "docker.io/library/python:3.12-slim"cpus = 1memory_mb = 2048[verifier]network_mode = "allowlist"timeout_sec = 18012345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758"""Offline structural validation only; external rubric judge assigns 0–7 points."""import json, os, statLIMIT = 200_000
def read_own(path): """Reject links, special files, multiple hard links, and oversized files.""" parts = os.path.abspath(path).split('/')[1:] folder = os.open('/', os.O_RDONLY | os.O_DIRECTORY) try: for part in parts[:-1]: inner = os.open(part, os.O_RDONLY | os.O_DIRECTORY | os.O_NOFOLLOW, dir_fd=folder) os.close(folder) folder = inner fd = os.open(parts[-1], os.O_RDONLY | os.O_NOFOLLOW | os.O_NONBLOCK, dir_fd=folder) finally: os.close(folder) with os.fdopen(fd, 'rb') as stream: info = os.fstat(stream.fileno()) if not stat.S_ISREG(info.st_mode) or info.st_nlink != 1: raise ValueError('not a regular file with one link') data = stream.read(LIMIT + 1) if len(data) > LIMIT: raise ValueError('file exceeds 200000 bytes') return data
def write_new(path, data): try: os.unlink(path) except FileNotFoundError: pass fd = os.open(path, os.O_WRONLY | os.O_CREAT | os.O_EXCL | os.O_NOFOLLOW, 0o644) with os.fdopen(fd, 'wb') as f: f.write(data)
def main(): out = os.environ['VERIFIER_DIR'] os.makedirs(out, exist_ok=True) write_new(os.path.join(out, 'reward.txt'), b'0\n') proof_path = os.path.join(out, 'proof.md') try: os.unlink(proof_path) except FileNotFoundError: pass reference = open(os.path.join(os.environ['TESTS_DIR'], 'reference.json'), 'rb').read() json.loads(reference) write_new(os.path.join(out, 'reference.json'), reference) status, count, reason = 'missing', 0, 'proof unavailable or invalid' try: raw = read_own(os.environ['PROOF']) proof = raw.decode('utf-8', 'strict') count = len(proof) write_new(proof_path, raw) if sum(not c.isspace() for c in proof) < 20: status, reason = 'empty', 'fewer than 20 non-whitespace characters' else: status, reason = 'submitted_for_judge', 'structurally valid submission' except (OSError, ValueError, UnicodeError) as e: reason = 'proof unavailable or invalid: ' + str(e)[:200] result = {'status': status, 'char_count': count, 'requires_llm_judge': True, 'max_score': 7, 'reason': reason} write_new(os.path.join(out, 'grade.json'), (json.dumps(result, ensure_ascii=False, indent=2)+'\n').encode()) if status == 'submitted_for_judge': write_new(os.path.join(out, 'reward.txt'), b'1\n') print(status, 'structural reward:', int(status == 'submitted_for_judge'))if __name__ == '__main__': main()123456789101112{ "problem": "Prove that there exist two real-coefficient polynomials $P(x)$ and $Q(x)$ satisfying the following condition:\n\n (Condition) The degree of the polynomial $P(x)$ is at least 2024, the degree of $Q(x)$ is at least 2, and for any real number $x$, the following holds:\n\n \\[\n P(Q(x)-x-1)=Q(P(x))\n \\]", "solution": "<Step 1> Checking the possibility of recursive construction using induction\n\n <Step 1.1> Let's assume that two polynomials $P_{0}$ and $Q_{0}$ satisfy the polynomial equation given in the problem as follows:\n\n \\[\n P_{0}\\left(Q_{0}(x)-x-1\\right)=Q_{0}\\left(P_{0}(x)\\right)\n \\]\n\n <Step 1.2> For a positive integer $n$, let's define the polynomial $P_{n}(x)$ recursively as follows:\n\n \\[\n P_{n}(x)=P_{n-1}\\left(Q_{0}(x)-x-1\\right); n \\geq 1\n \\]\n\n <Step 1.3> Let's prove by mathematical induction that for any non-negative integer $n$, $(P_{n}, Q_{0})$ also satisfies the given polynomial equation.\n\n *(1)* First, we have already confirmed that the case $n=0$ holds.\n\n *(2)* Next, let's assume that the case $n=k$ holds, i.e., assume that $(P_{k}, Q_{0})$ is also a solution to the polynomial equation. Then, by the induction hypothesis and the recursive formula for $P_{n}$ defined above, we have\n\n \\[\n P_{k+1}(x)=P_{k}\\left(Q_{0}(x)-x-1\\right)=Q_{0}\\left(P_{k}(x)\\right)\n \\]\n\n Now, substituting $x=Q_{0}(y)-y-1$, we get\n\n \\[\n P_{k+1}\\left(Q_{0}(y)-y-1\\right)=Q_{0}\\left(P_{k}\\left(Q_{0}(y)-y-1\\right)\\right)=Q_{0}\\left(P_{k+1}(y)\\right)\n \\]\n\n Therefore, we can see that the proposition holds for the case $n=k+1$.\n\n <Step 2> Initialization\n\n <Step 2.1> As we saw in <Step 1>, if we find an initial solution $(P_{0}, Q_{0})$, we can continuously generate solutions. In particular, looking at the recursive formula for $P_{n}$, if the degree of $Q_{0}$ is at least 2, the degree of $P_{n}$ is twice the degree of $P_{n-1}$, which continuously increases. Therefore, by repeating this process, we can eventually make the degree of $P_{n}$ greater than 2024.\n\n <Step 2.2> Therefore, to find an initial solution, let's first try $P_{0}$ as a linear polynomial and $Q_{0}$ as a quadratic polynomial. It is easy to see that there are no possible cases. If both $P_{0}$ and $Q_{0}$ are quadratic polynomials, substituting $P_{0}(x)=ax^{2}+bx+c$, $Q_{0}(x)=ux^{2}+vx+w$ and using the method of undetermined coefficients, we find that\n\n \\[\n P_{0}(x)=x^{2}+\\frac{5}{2} x, \\quad Q_{0}(x)=x^{2}+\\frac{7}{2} x+\\frac{3}{2}\n \\]\n\n is a solution to the polynomial equation $P_{0}\\left(Q_{0}(x)-x-1\\right)=Q_{0}\\left(P_{0}(x)\\right)$.\n\n <Step 2.3> Now, repeating <Step 1> based on this initial solution, $(P_{n}, Q_{0})$ is also a solution for any $n$, and in particular, the degree of $P_{11}$ is 2048, which is greater than 2024.", "grading_guidelines": "(Partial)\n 1. Found a non-constant solution $P$, $Q$ satisfies the equation.\n(Almost)\n 1. Described a contruction that enables us to increase the degree of the solutions, but did not fully verify.", "problem_id": "PB-Advanced-007", "level": "advanced", "category": "Algebra", "source": "Novel Problem", "max_score": 7, "difficulty": "IMO-easy", "short_answer": " "}12345678910#!/bin/sh# Reward measures structural submission validity only, not mathematical correctness.# External rubric-guided LLM judging against reference.json awards 0–7 points.# Offline, isolated Python; PROOF and VERIFIER_DIR allow local verification.set -euhere=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)export TESTS_DIR="$here" PROOF="${PROOF:-/app/proof.md}" VERIFIER_DIR="${VERIFIER_DIR:-/logs/verifier}"mkdir -p "$VERIFIER_DIR"printf '0\n' > "$VERIFIER_DIR/reward.txt"python3 -I -S "$here/grade_task.py"1234567891011121314151617# PB-Advanced-008
Solve the following problem using your own reasoning and local tools. Do not use web lookups or external models. Write a complete, self-contained, rigorous mathematical proof to `/app/proof.md`; create `/app` if necessary.
## Problem
Let $\left\{F_{n}\right\}_{n \geq 1}$ be a sequence of integers satisfying $F_{1}=1$ and for $n \geq 2$, \[ F_{n}=n^{F_{n-1}}. \] For example, $F_3 = 3^2= 9$ and $F_4 = 4^9$.
Prove that for any positive integers $a, c$ and integer $b$, there exists a positive integer $n$ such that the following expression is an integer:
\[ \frac{a^{F_{n}}+n-b}{c}. \]123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110#!/bin/shset -euPROOF=${PROOF:-/app/proof.md}mkdir -p "$(dirname -- "$PROOF")"cat > "$PROOF" <<'IMO_PROOF_25823c9e705bbb7180ed55319546730cc034932e770b777af059a80fc451705d'First, let's prove the following Lemma, which is an extension of Euler's theorem.
<Lemma 1> Given positive integers $n$ and $a$, there exists a positive integer $N$ such that for any positive integer $k \geq N$, $a^{k+\phi(n)} \equiv a^{k}(\bmod n)$ holds.
<Proof of Lemma 1> Let $p_1, p_2, \cdots, p_t$ the common prime divisors of $n$ and $a$, and let $\max_{1\le i\le t} v_{p_i} (n) =M$. Then, if we set $N=M$, the conclusion holds. Let $n=p_n \times q_n$, $a=p_a \times q_a$, where $p_n$ and $p_a$ represents the $p_1, p_2, \cdots, p_t$ part of the prime factorization of $n, a$, respectively. Note that $p_n | (p_1 p_2 \cdots p_t )^M$, and that $(a, q_n) =1$.
First, if $k \geq M$, then $a^{k+\phi(n)} \equiv a^{k} \equiv 0\left(\bmod p_n \right)$. Also, $\phi(n)=\phi\left(p_n \right) \cdot \phi(q_n)$, so
\[ a^{k+\phi(n)} \equiv a^{k+\phi\left(p_n\right) \cdot \phi(q_n)} \equiv a^{k}(\bmod q_m) \]
holds. Combining the two equations, we obtain $a^{k+\phi(n)} \equiv a^{k}(\bmod n)$, which completes the proof. $\qed$
Let's also prove the following Lemma about $F_{n}$.
<Lemma 2> Given positive integers $n$ and $a$, there exists a positive integer $N$ such that for any positive integer $k \geq N$, $F_{k} \equiv F_{k+\Phi(n)}(\bmod n)$ holds.
Here, $\Phi(n)$ is the least common multiple of $n, \phi(n), \phi^{(2)}(n), \ldots$.
<Proof of Lemma 2>
We will prove this by induction on $n$.
(1) (Base case) If $n=1$, the statement holds trivially.
(2) (Induction step) Assume that the statement holds for all positive integers less than $n$.
By the induction hypothesis, there exists a positive integer $N$ such that for $k \geq N$,
\[ F_{k} \equiv F_{k+\Phi(\phi(n))}(\bmod \phi(n)) \]
holds.
Now, consider the least common multiple of $\Phi(\phi(n))$ and $n$, which is $\Phi(n)$. Since $F_{k+1}=(k+1)^{F_{k}}$, by <Lemma $1>$,
\[ (k+\Phi(n)+1)^{F_{k+\Phi(n)}} \equiv(k+1)^{F_{k+\Phi(n)}} \equiv(k+1)^{F_{k}}(\bmod n) \]
holds for all sufficiently large $k$. Therefore, the statement also holds for $n$. $\qed$
Now, let's prove the original problem. <Step 1>$ \operatorname{gcd}(\Phi(\phi(c)), c)<c$
<Step 1.1> Factorize $c$ into primes as $c=p_{1}^{e_{1}} \cdots p_{k}^{e_{k}}$. Also, let $p_{1}<\cdots<p_{k}, e_{i}>0$.
<Step 1.2> Then, $\phi(c)=p_{1}^{e_{1}-1} \cdots p_{k}^{e_{k}-1}\left(p_{1}-1\right) \cdots\left(p_{k}-1\right)$, and since $p_{i}-1$ is not a multiple of $p_{k}$,
\[ v_{p_{k}}(\phi(c))<v_{p_{k}}(c) \]
holds. Also, the largest prime factor of $\phi(c)$ is less than or equal to $p_{k}$.
<Step 1.3> Therefore, by induction, for all positive integers $r$, $v_{p_{k}}\left(\phi^{(r)}(c)\right)<v_{p_{k}}(c)$ holds.
<Step 2> Applying strong induction on $c$
We will prove the problem by strong mathematical induction on $c$.
<Step 2.1> If $c=1$, the statement holds for any positive integer $n$.
<Step 2.2> Assume that the statement holds for $c=1, \ldots c-1$, and let's prove the statement for $c$.
First, choose $n$ large enough so that
\[ a^{F_{n}} \equiv a^{F_n+\phi(c)}(\bmod c) \]
holds. By <Step 1>, $\operatorname{gcd}(c, \Phi(\phi(c)))<c$, so by the induction hypothesis,
\[ a^{F_{n}}+n \equiv b(\bmod \operatorname{gcd}(c, \Phi(\phi(c))) \]
has infinitely many solutions for $n$.
<Step 2.3> By <Lemma 2>, among these solutions, for sufficiently large $n$,
\[ a^{F_{n}} \equiv a^{F_{n+\Phi(\phi(c))}}(\bmod c) \]
holds. Let this $n$ be $n_{0}$.
<Step 2.4> Consider the following system of congruences for $n$:
\[ n \equiv n_{0}(\bmod \Phi(\phi(c))), a^{F_{n_{0}}}+n \equiv b(\bmod c) \]
This system of congruences has $n_{0}$ as a solution modulo $\operatorname{gcd}(c, \Phi(\phi(c)))$, so by the Chinese Remainder Theorem, there exists an $n$ that satisfies both congruences modulo $\operatorname{lcm}(\Phi(\phi(c)), c)$. For this $n$,
\[ a^{F_{n}}+n \equiv a^{F_{n_{0}}}+n \equiv b(\bmod c) \]
holds, so the desired equation holds, and therefore the induction hypothesis holds for $c$.
By induction, for all $c$, there exist infinitely many $n$ that satisfy $a^{F_{n}}+n \equiv b(\bmod c)$.IMO_PROOF_25823c9e705bbb7180ed55319546730cc034932e770b777af059a80fc451705d1234567891011121314151617181920schema_version = "1.4"artifacts = ["/app/proof.md"][task]name = "imo-proofbench/pb-advanced-008"version = "1.0.0"description = "IMO-ProofBench mathematical proof task"keywords = ["math", "proof", "imo"][metadata]problem_id = "PB-Advanced-008"level = "advanced"[agent]network_mode = "allowlist"timeout_sec = 3600[environment]docker_image = "docker.io/library/python:3.12-slim"cpus = 1memory_mb = 2048[verifier]network_mode = "allowlist"timeout_sec = 180README.mdAdded+33
subsets/advanced_tasks.jsonlAdded+30
subsets/all_tasks.jsonlAdded+60
subsets/basic_tasks.jsonlAdded+30
tasks/manifest.jsonAdded+546
tasks/pb-advanced-001/instruction.mdAdded+7
tasks/pb-advanced-001/solution/solve.shAdded+89
tasks/pb-advanced-001/task.tomlAdded+20
tasks/pb-advanced-001/tests/grade_task.pyAdded+58
tasks/pb-advanced-001/tests/reference.jsonAdded+12
tasks/pb-advanced-001/tests/test.shAdded+10
tasks/pb-advanced-002/instruction.mdAdded+7
tasks/pb-advanced-002/solution/solve.shAdded+14
tasks/pb-advanced-002/task.tomlAdded+20
tasks/pb-advanced-002/tests/grade_task.pyAdded+58
tasks/pb-advanced-002/tests/reference.jsonAdded+12
tasks/pb-advanced-002/tests/test.shAdded+10
tasks/pb-advanced-003/instruction.mdAdded+7
tasks/pb-advanced-003/solution/solve.shAdded+87
tasks/pb-advanced-003/task.tomlAdded+20
tasks/pb-advanced-003/tests/grade_task.pyAdded+58
tasks/pb-advanced-003/tests/reference.jsonAdded+12
tasks/pb-advanced-003/tests/test.shAdded+10
tasks/pb-advanced-004/instruction.mdAdded+7
tasks/pb-advanced-004/solution/solve.shAdded+70
tasks/pb-advanced-004/task.tomlAdded+20
tasks/pb-advanced-004/tests/grade_task.pyAdded+58
tasks/pb-advanced-004/tests/reference.jsonAdded+12
tasks/pb-advanced-004/tests/test.shAdded+10
tasks/pb-advanced-005/instruction.mdAdded+12
tasks/pb-advanced-005/solution/solve.shAdded+163
tasks/pb-advanced-005/task.tomlAdded+20
tasks/pb-advanced-005/tests/grade_task.pyAdded+58
tasks/pb-advanced-005/tests/reference.jsonAdded+12
tasks/pb-advanced-005/tests/test.shAdded+10
tasks/pb-advanced-006/instruction.mdAdded+12
tasks/pb-advanced-006/solution/solve.shAdded+145
tasks/pb-advanced-006/task.tomlAdded+20
tasks/pb-advanced-006/tests/grade_task.pyAdded+58
tasks/pb-advanced-006/tests/reference.jsonAdded+12
tasks/pb-advanced-006/tests/test.shAdded+10
tasks/pb-advanced-007/instruction.mdAdded+13
tasks/pb-advanced-007/solution/solve.shAdded+51
tasks/pb-advanced-007/task.tomlAdded+20
tasks/pb-advanced-007/tests/grade_task.pyAdded+58
tasks/pb-advanced-007/tests/reference.jsonAdded+12
tasks/pb-advanced-007/tests/test.shAdded+10
tasks/pb-advanced-008/instruction.mdAdded+17
tasks/pb-advanced-008/solution/solve.shAdded+110
tasks/pb-advanced-008/task.tomlAdded+20