As someone who has spent over a decade programming, I hate to admit it: the last stronghold of coding, competitive programming, has just been conquered by AI.
Competitive programming used to be the last domain where humans still dominated. In live contests like codeforces, participants need to solve a set of difficult coding problems, all under tight time pressure. Humans still outperformed the best AI systems in codeforces compeitions: OpenAI's o3 reached 175th place; The strongest recent result was from Google's Gemini 3 Deep Think, which reached 8th place.
But today, AI came out on top .
GrandCode , an AI agent, achieved the first place in competitive programming. In the most recent three Codeforces live competitions, Round 1087 on Mar 21, Round 1088 on Mar 28, and Round 1089 on Mar 29, GrandCode ranked the first in all of them, beating all human participants, including legendary grandmasters.
If we look at the timeline, it is astonishing how quickly AI has advanced in just one year:
- 1st — GrandCode (March 2026)
- 8th — Gemini 3.1 Pro (February 2026)
- 175th — OpenAI o3 (April 2025)
Participating Results
GrandCode participated in the three most recent Codeforces live competitions under the contestant IDs averyjones1 in Round 1087, yokeko in Round 1088, and Vortex1 in Round 1089.
- S (separate) is obtained by summing the scores of tasks at the time they are completed with submissions filed sperately.
- S (joint) is the score based on the full set of submissions in a single account.
GrandCode ranked first in all three contests it participated in.
In each contest, GrandCode was also the first to solve all problems.
Now is the era of AI agents.
GrandCode is a multi-agent AI system powered by reinforcement learning. It orchestrates a variety of agentic modules, including hypothesis generator, solver, test generator, and summarization, and jointly improves them through iterative reasoning, verification, and feedback.
- The hypothesis generator proposes intermediate claims or structural properties and verifies them on small cases.
- The summarization model maintains a compact memory of long-context reasoning.
- The test-case generator produces problem-specific test cases to challenge proposed solutions.
- The main solver takes primary responsibility for reasoning and solution generation.
All of these components are trained together in a multi-agent reinforcement learning loop.
Hypothesis Generator
Hypothesis generation is a key component of GrandCode. Just as humans often do in coding or math, it begins by proposing intermediate claims or structural properties rather than directly searching for the full solution. These hypotheses are quickly tested on small instances, which makes exploration much more efficient . When a hypothesis is validated, it can significantly accelerate the path to the final solution; when it fails, the feedback is used to refine it into a better hypothesis.
Post Training
Post Training Involves the following three stages:
- Continued pre-training on broad competitive programming data to improve the model's general problem-solving ability. We start from existing task datasets, use them as seeds for data expansion, generate additional data with Claude and Gemini, and continue training the Qwen model on the resulting corpus.
-
Supervised fine-tuning
on high-quality
(question, thinking, solution)triples. Given(question, solution)pairs, we design methods to generate reasoning traces for data expansion, and then use the resulting triples for supervised fine-tuning. - Multi-component reinforcement learning to jointly optimize the full system, enabling the main solver and the auxiliary components to collaborate more effectively under the final objective.
Test-time Reinforcement Learning
We use test-time RL in live contests to find the best possible solution for the task at hand. This is different from post-training RL , which improves the model's general competitive-programming ability across many problems.
Different from post-training RL, which improves general ability across many problems by maximizing expected reward,
test-time RL is applied only to the current problem and aims to find the single best solution.
Smoothing is required for stable training.
To make test-time training efficient, we optimize only LoRA parameters. We further improve efficiency by summarizing RL trials: alongside historical solutions, we maintain a compact summary of which strategies have been explored, what has worked, and what has failed.
Conclusion
Now that the last stronghold of coding has fallen, what will be the next frontier to conquer, autonomous scientific discovery, materials science, controlled fusion, or quantum computing?
It came, it saw, it conquered.