Case study · Algorithmic reasoning

Competitive Coding

100 original contest-level problems that frontier models solve only sometimes. Each comes with a reference solution, a full proof and hidden tests built to reject the mistakes models tend to make.

  • DP
  • Graphs
  • Number theory
  • Geometry
Results at a glance
Tested against DeepSeek V4 Pro, 8 attempts per problem
problems, each a full package
100
average solve rate allowed over 8 attempts. Anything easier gets dropped.
≤40%
independent one-shot attempts per problem
8
exhaustive small inputs checked against a brute force, zero mismatches
5,077
Client
An AI lab, through an AI data platform
Our role
Writer
Focus
Python, C++, Proofs, Hidden tests
01
The client

An AI lab, through an AI data platform

We built this work for an AI lab, through the data platform it uses to source expert tasks. Our engineers took part in every stage, from designing and writing tasks to reviewing them and making sure they hold up against the strongest models. The lab needed reasoning problems in the useful middle: hard enough to teach something, still provably solvable.

We work under NDA, so the client, the platform and the project's internal name are not shown. The numbers and the sample below are published with that in mind.

02
What we built

Original competitive programming problems

Contest programming problems are one of the most common ways to measure how well AI models reason, because every problem has a precise statement and hidden tests, so a solution either works or it doesn’t. We wrote original contest-level problems for AI training and evaluation.

  • A precise statement

    Clear constraints and limits, so the problem can be solved from its own text and each input has exactly one correct output.

  • A reference solution

    In Python or C++, checked against a separate brute force on exhaustive small inputs.

  • A full proof

    An editorial that proves every branch of the solution.

  • Hidden tests

    Tests written to reject the wrong solutions a model is likely to try.

Problems no model can solve teach nothing, and easy ones prove nothing. Every problem here sits in the useful middle, where a frontier model only sometimes gets it right.
Why it matters
03
How we validated it

Every task had to pass these checks

  1. Brute-force cross-check

    A simple brute force was compared with the reference on exhaustive small inputs.

  2. Strong tests

    The tests must reject the wrong answers a model would likely try, like off-by-one mistakes and overflow.

  3. One valid answer

    Every input has exactly one correct output, so grading is never ambiguous.

  4. Calibrated difficulty

    An average solve rate of 40% or less over 8 attempts, with at least one solve. Anything easier was dropped.

How the tasks were tested

Model tested
DeepSeek V4 Pro.
Attempts per problem
8.
Independent sessions
Yes. Each attempt was a separate one-shot run in its own container, with no memory of the other attempts.
Pass bar
The model had to average 40% or less over the 8 attempts (at least 5 of 8 failing) and still solve the problem at least once.
04
The numbers

Topics

100
problems, each a full package
≤40%
average solve rate allowed over 8 attempts. Anything easier gets dropped.
11
topics, from prefix sums to geometry
Algorithms
Dynamic programming, graphs, flows and matching, and game theory.
Math
Counting and combinatorics, probability and expected value, number theory and geometry.
Data structures and strings
Arrays and prefix sums, strings and trees.
  • Topics: arrays and prefix sums, dynamic programming, counting and combinatorics, probability and expected value, number theory, strings, graphs, flows and matching, game theory, geometry and trees.
  • Public tests such as LiveCodeBench and Codeforces-style ratings use contest problems for the same reason: a solution either works or it doesn’t.
05
Sample task

Lights on a street

A simplified example for illustration. It is not a task from the client’s set.

problem.md
A street has n lamps in a row, some on and some off. In one move you can flip any block of k neighbouring lamps. Print the smallest number of moves that turns every lamp on, or -1 if it cannot be done. Constraints, time limit and memory limit are given in full.
Setup
A self-contained statement with constraints and limits. The solver submits Python or C++.
Why models get it wrong
A solution has to be both correct on every edge case and fast enough on the largest inputs.
How it is graded
  • Hidden tests check every output.
  • The reference was validated against a brute force on exhaustive small inputs.
  • The tests reject common wrong solutions, such as off-by-one mistakes and overflow.
  • Calibrated to an average solve rate of 40% or less over 8 attempts.
06
What we learned

What the project taught us

  1. 01
    Never trust the reference alone

    A separate brute force checked 5,077 exhaustive small inputs against the reference, with zero mismatches.

  2. 02
    Passing every test proves little

    Tests are only as good as the wrong answers they reject.

  3. 03
    Difficulty has a sweet spot

    Problems no model can solve teach nothing, and easy ones prove nothing.

Work with us

Need reasoning problems at the edge of what models can solve?

Our competitive programmers write original problems with proofs, brute-force checks and strong tests, calibrated against frontier models.

Talk to our teamSee all AI training work