Humanity's Last Code Exam: Can Advanced LLMs Conquer Human's Hardest Code Competition?

Xiangyang Li, Xiaopeng Li, Kuicai Dong, Quanhu Zhang, Rongju Ruan +5 more
6/15/2025
cs.SEcs.CL

Official code: Humanity-s-Last-Code-Exam/HLCE (95 stars, last commit 2025-08-21).

Abstract

Code generation is a core capability of large language models (LLMs), yet mainstream benchmarks (e.g., APPs and LiveCodeBench) contain questions with medium-level difficulty and pose no challenge to advanced LLMs. To better reflected the advanced reasoning and code generation ability, We introduce Humanity's Last Code Exam (HLCE), comprising 235 most challenging problems from the International Collegiate Programming Contest (ICPC World Finals) and the International Olympiad in Informatics (IOI) spanning 2010 - 2024. As part of HLCE, we design a harmonized online-offline sandbox that guarantees fully reproducible evaluation. Through our comprehensive evaluation, we observe that even the strongest reasoning LLMs: o4-mini(high) and Gemini-2.5 Pro, achieve pass@1 rates of only 15.9% and 11.4%, respectively. Meanwhile, we propose a novel "self-recognition" task to measure LLMs' awareness of their own capabilities. Results indicate that LLMs' self-recognition abilities are not proportionally correlated with their code generation performance. Finally, our empirical validation of test-time scaling laws reveals that current advanced LLMs have substantial room for improvement on complex programming tasks. We expect HLCE to become a milestone challenge for code generation and to catalyze advances in high-performance reasoning and human-AI collaborative programming. Our code and dataset are also public available(https://github.com/Humanity-s-Last-Code-Exam/HLCE).

View on arXivView PDF

Code Implementations(1)

(EMNLP 2025 Findings) Source Evaluation scripts for Humanity's Last Code Exam

958PythonMay 29, 20251 years ago
benchmarkcodegencodellmllmllm-evaluation

Similar Papers

Cite this paper

@article{li2025humanitys,
  title  = {Humanity's Last Code Exam: Can Advanced LLMs Conquer Human's Hardest Code Competition?},
  author = {Xiangyang Li and Xiaopeng Li and Kuicai Dong and Quanhu Zhang and Rongju Ruan and Xinyi Dai and Xiaoshuang Liu and Shengchun Xu and Yasheng Wang and Ruiming Tang},
  year   = {2025},
  eprint = {2506.12713},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.12713v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2506.12713.svg)](https://codeofpaper.com/paper/2506.12713)

Discussion