Leeking's blog

By Leeking, history, 3 days ago, In English
Description

TL;DR

  • LeekCF-Hinter is a free, open-source (Apache-2.0) public API. GET /v1/problems/{contestId}/{index}/hints returns 2 to 5 graded hints for a Codeforces problem: a small nudge first, the full solution last. No key, no account. Check it out: https://leekcf-hinter-api.leekcf.workers.dev .
  • Any extension, app, bot or person can use it. It is a plain public API with open CORS, so a browser extension can call it directly.
  • LeekCF-Ratings already uses it today. Install the extension (Chrome or Firefox), open a problem and click Show Hints. You can watch the requests yourself in DevTools.
  • 6,833 problems already have hints (25,788 hints across 1,176 contests), and about 1,640 more are queued. They should be done around November 5.
  • It runs for $0: GitHub Actions, Supabase and Cloudflare Workers, all on free plans.
  • The hints are written by Google's Gemini Flash models on the free tier, for cost reasons. They can be wrong.

example


The endpoint

curl "https://leekcf-hinter-api.leekcf.workers.dev/v1/problems/1850/A/hints?client=my-app/1.0"
{
  "problem": { "id": "1850_A", "contestId": 1850, "index": "A", "name": "To My Critics", "rating": 800, "tags": ["implementation", "sortings"] },
  "duplicateOf": null,
  "hints": [
    { "level": 1, "content": "Since there are only three digits $$$a$$$, $$$b$$$, and $$$c$$$, there are only three possible pairs you can choose... Think about which pair will naturally produce the largest sum." },
    { "level": 2, "content": "..." }
  ],
  "groundedInTutorial": true,
  "generatedAt": "2026-10-31T15:18:37Z"
}

That is the whole contract. A 404 means "no hints for this problem (yet)". The root URL is a documentation page, and the OpenAPI spec is at /v1/openapi.json. Please add ?client=your-app/1.0 so usage can be counted per app, cache what you get, and stay under the rate limit (about one request per second per IP, after a small burst).

Anyone can use it

This is the point of making it an API: any extension, website, bot, editor plugin, script, or just you with curl can use it. There is no key to request and no signup, and the answers are open to browsers (CORS is *), so an extension or a web page can call it directly. Build your own "Show Hints" button, a Discord bot, a VS Code sidebar, a practice tracker. If you do, I would love to hear about it. **Check it out: https://leekcf-hinter-api.leekcf.workers.dev** (the root page is the documentation).

What a "hint" means here

Every problem gets 2 to 5 hints, depending on difficulty (roughly 2 for ratings up to 1000, up to 5 above 2000). They are written as a ladder:

  1. Hint 1 is one observation, such as what the limits imply or a special case worth checking.
  2. Hints 1 and 2 never name an algorithm. This is checked automatically, and an answer that breaks the rule is thrown away and regenerated.
  3. From hint 3 on, the hint may name the technique, the recurrence and the complexity.
  4. The last hint is the complete solution, in prose. Never code.

For example, problem 1342D (*Multiple Testcases*, rated 1900) starts like this:

Hint 1. Consider a fixed size $$$i$$$. If you count how many of the given arrays have a size of at least $$$i$$$, let's call this count $$$g_i$$$, what is the absolute minimum number of testcases required just to accommodate these $$$g_i$$$ arrays...?

Hint 2. The requirement from each size $$$i$$$ provides a lower bound of $$$\lceil g_i / c_i \rceil$$$ on the total number of testcases. It turns out that the maximum of this value over all sizes is both necessary and sufficient...

Hints are only served for contests that are over, plus a 2-hour margin for system tests, so a live round is never spoiled.

observation → idea → technique → full solution

See it working: LeekCF-Ratings already uses it

LeekCF-Ratings is a small extension for Codeforces practice, and it already uses the API today. It shows a problem's rating but hides the tags, so you can practice blind and reveal one tag at a time. Version 3 added Show Hints. Install it from the Chrome Web Store or Firefox Add-ons, or read the code on GitHub. It is just one client of the API; yours can be another.

show vs hide hints

full solution button

Open your browser's DevTools, go to the Network tab, click Show Hints, and you will see the exact request and the full response.

hints on devTools

Why Flash (the honest part)

This project has a budget of zero, so the hints are written by Google's Gemini Flash models on the free tier (98% of them by Flash-Lite). I chose them for cost reasons, not because they are the best option. Every hint is grounded in the official editorial, which helps a lot. I have not yet measured how often a hint is wrong compared with a stronger model, so treat them as a nudge and not as gospel.

The free quota also sets the speed: about 480 problems a day, which is why the backlog takes days.

Beta stats (November 2, 2026)

Problems indexed 10,763
With hints 6,833 (63% of all, 81% of the 8,475 that have an editorial)
Hints written 25,788 (3.8 per problem on average)
Hints per problem 2 → 1,193 · 3 → 1,657 · 4 → 1,484 · 5 → 2,499
Contests covered 1,176 (contest ids 14 to 2278)
Grounded in the official editorial 6,833 of 6,833
Written by Gemini Flash family: 98% Flash-Lite, 2% Flash
Queued (editorial found) 1,642, done around Nov 5 at ~480 a day
Parked (no editorial found yet) 2,205, mostly older contests; hints written without an editorial are less reliable, so they wait
Skipped 26 (22 are PDF-only statements; 4 the parser can't read)
Traffic so far a few dozen API requests a day, so it is a real beta

What's next

  • Check a sample of hints against the editorials and publish the real numbers.
  • Regenerate everything with a stronger model.
  • Decide whether to write hints for problems that have no editorial at all.

Want to make it better? Message me

Everything is open source: the pipeline, the prompt and the validator. The weak link is the model, because free-tier Flash is what I can afford. A top model would write better hints, but redoing the whole set costs real money that I do not have.

**If you have paid access to Claude Opus or DeepSeek (credits, a key, a spare budget) and want to regenerate the hints with a stronger model, or you just want to help check hints for accuracy, send me a message on Codeforces or Github

Links and credits

Full text and comments »

  • Vote: I like it
  • +46
  • Vote: I do not like it

By Leeking, history, 2 weeks ago, In English

This semester I'm taking statistics and probability at university, and one question came to my mind: why not apply some of this to something I actually use? And here we are

The result is LeekCF-Analytics. Open any Codeforces profile and a new panel appears. It shows every change in your rating, contest by contest:

It skips your first three contests.

I don't think it serves any real purpose, but if you're curious, you can get it from GitHub, the Chrome Web Store, or Firefox Add-ons.

Go check your negative delta in a beautiful way

Full text and comments »

  • Vote: I like it
  • +13
  • Vote: I do not like it

By Leeking, history, 4 weeks ago, In English

I took every Codeforces user who (a) was rated 1400 or higher at some point in 2021 and (b) is still competing (active rated list, and at least one rated contest since 2025-01-01). That is 746 users. I pulled their full rating histories from the public Codeforces API and measured the cohort at each major AI release that mattered for competitive programming.

All numbers below come from user.ratedList and user.rating. Data was fetched on 2026-10-08. Charts and code are available on request.

Important caveat up front: this post shows what happened. It does not show why. Rating trends have many causes, and I mark clearly where I'm speculating.

How the cohort was built

  1. user.ratedList?activeOnly=true returned 43,131 active rated users.
  2. I kept those registered by the end of 2021 whose max rating is ≥ 1400: 1,600 candidates.
  3. For each candidate I fetched user.rating and kept those whose rating was ≥ 1400 at any time in 2021 (including the rating carried over from 2020) and who competed since 2025-01-01. Result: 746 users.
  4. For every checkpoint date I used each user's rating after their last rated contest on or before that date.

Segments by 2021 peak: 1400–1599 (211 users), 1600–1899 (222), 1900+ (313).

The checkpoints

Date Checkpoint
2021-01-01 Baseline
2022-02-02 AlphaCode (DeepMind announcement)
2022-11-30 ChatGPT launch
2023-03-14 GPT-4
2024-05-13 GPT-4o
2024-09-12 o1-preview
2024-12-05 o1
2025-01-20 DeepSeek-R1
2025-04-16 o3 / o4-mini
2025-08-07 GPT-5
2025-09-17 ICPC World Finals 2025: AI gold-level results
2026-04-23 GPT-5.5 (†)
2026-07-24 Claude Opus 5 (†)
2026-09-22 Opus 5.5 / GPT-6 (†)
2026-10-08 Now

(†) 2026 dates come from third-party sources that disagreed with each other. Treat those lines as approximate.

1. The big picture: up until mid-2025, then down

Median rating over time

Checkpoint Rated Mean 25th pct Median 75th pct
2021-01-01 628 1720 1430 1660 2022
AlphaCode (2022-02) 746 1815 1499 1713 2046
ChatGPT (2022-11) 746 1855 1549 1783 2109
GPT-4 (2023-03) 746 1870 1552 1804 2121
GPT-4o (2024-05) 746 1914 1577 1851 2174
o1-preview (2024-09) 746 1921 1582 1864 2199
o1 (2024-12) 746 1928 1578 1870 2198
DeepSeek-R1 (2025-01) 746 1932 1598 1866 2200
o3 / o4-mini (2025-04) 746 1931 1589 1866 2206
GPT-5 (2025-08) 746 1932 1566 1882 2218
ICPC WF (2025-09) 746 1931 1568 1872 2228
GPT-5.5 (2026-04) † 746 1890 1549 1831 2152
Claude Opus 5 (2026-07) † 746 1861 1534 1818 2138
Opus 5.5 / GPT-6 (2026-09) † 746 1838 1495 1779 2113
Now (2026-10-08) 746 1839 1507 1788 2124

(The baseline row has 628 users because the other 118 had no rating yet on 2021-01-01.)

  • The cohort median rose about +210 points from Jan 2021 to its peak in Sep 2025 (1660 → 1872–1882).
  • Since Sep 2025 the median has fallen about −85 points and the mean about −92.
  • Today, 44.5% of the cohort are above their 2021-01-01 rating (median change vs. baseline: +25).

2. The rating bands

Rating band shares

Checkpoint <1400 1400–1599 1600–1899 1900–2099 2100–2399 2400+
2021-01 19.7 23.4 24.5 11.3 12.1 8.9
ChatGPT 8.4 22.3 28.2 15.3 15.4 10.5
o1-preview 8.7 17.3 26.4 13.0 20.4 14.2
GPT-5 10.3 16.9 24.1 14.9 18.4 15.4
ICPC WF 10.2 16.6 24.9 14.1 19.0 15.1
Now 16.8 15.3 27.9 13.8 14.5 11.8

The share rated 2400+ peaked at 15.4% (Aug 2025) and is now 11.8%. The share below 1400 has gone from 8.3% (Apr 2025) to 16.8%. Today 125 of the 746 users are below 1400, so "everyone above 1400" does not hold for this cohort any more.

3. Who moved, and when?

Change between checkpoints

Between checkpoints, the median change per user is about zero. What changes is the spread and the skew:

  • 2022–2024: wide boxes shifted upward. The top quarter of users gained about 120+ points between AlphaCode and ChatGPT, and again about 115+ between GPT-4 and GPT-4o.
  • 2024-09 to 2025-08: boxes tighten around zero. Few big movers.
  • 2025-09 onward: boxes shift downward. From the ICPC checkpoint to now, 71% of the cohort lost rating (28.7% gained, 0.4% unchanged), median change −96.

(The GPT-5 → ICPC box is flat because that window is only 41 days.)

4. By starting level

Segments

2021 peak segment n 2021-01 ChatGPT Peak era (ICPC WF) Now
1400–1599 211 1407 1468 1522 1505
1600–1899 222 1600 1681 1706 1667
1900+ 313 2062 2134 2221 2096

All three segments follow the same shape: growth until about mid-2025, then decline. The decline is largest for the 1900+ segment (−125 median since Sep 2025) and smallest for 1400–1599 (−17).

5. Rating change per contest

Delta per contest

The average rating change per contest in this cohort was +15 to +23 in 2021, about +1 to +6 from 2022 to 2024, and has been negative since 2025 Q2, reaching −14 in 2026 Q2.

6. Participation

Participation

About 400–520 cohort members play at least one rated round per quarter. It peaked in 2021 (about 520), dropped to about 400–450 by 2022–2023, and has stayed in that range since, with no collapse in 2025–2026. The decline above is therefore not explained by the cohort playing less. (The 2026 Q3 bar is left out because the cohort was selected for current activity, which makes it 100% by construction.)

What I can and cannot claim

What the data supports

  • This cohort improved steadily from 2021 to mid-2025 and has lost rating since.
  • The loss is broad (71% of users), concentrated in the top segment, and shows up as a negative average change per contest.
  • It is not driven by people playing less: participation has been steady since 2022.

What it does not show

  • Causation. The timing overlaps with AI releases. It also overlaps with changes in the contest pool, new strong participants, rating-system effects, and changes in how people train. I cannot separate these.
  • The whole population. The cohort only includes people who are still active. Everyone who quit after 2021 is missing, so this is survivorship-biased. The long-run average improvement is probably overstated.
  • Regression to the mean. Selecting on "≥ 1400 in 2021" favors people at a local peak.

Any comments?

Tell me your opinion or anything you understand from these graphs

Here's the info for every user at every checkpoint: spreadsheet.
Data fetched 2026-10-08.

Full text and comments »

  • Vote: I like it
  • +44
  • Vote: I do not like it

By Leeking, history, 4 weeks ago, In English

While roaming through old Codeforces contests, I found a strange gap from early 2014.
A whole series of consecutive Div1 and Div2 rounds has zero difficulty ratings on their problems:

Does anyone who was around back then know why this specific stretch was skipped? Did these rounds run into contest-day issues, or did the rating calculation script just bypass them?

Full text and comments »

  • Vote: I like it
  • +13
  • Vote: I do not like it

By Leeking, history, 5 weeks ago, In English

Faster, blurred tags, rank colors, and settings!

Get it here: Chrome Web Store | Firefox Add-ons

Hi everyone! A new version of LeekCF Rating, the extension that shows a problem's rating without spoiling its tags, is now available. Here's what changed.

Tags are revealed one at a time. Tags now appear blurred. If you're stuck, click a single tag to get one hint instead of seeing all of them at once. "Show All Tags" still works if you want everything.

New display features. The rating is now colored by Codeforces rank, from gray to red, and you can see how many people solved the problem. For fully blind practice, you can also hide the rating until you click it.

Settings. Click the extension icon, then the gear icon, to choose how tags are shown (blurred, hidden, or always visible) and to turn the hidden rating, colors, and solved count on or off. Changes apply to open tabs right away.

image

And please, if you find it useful, give it a try and leave a rating on the store. It really helps a small project like this one. Thank you

Quality of life
Faster performance
Note

Again if you find a bug, open an issue on GitHub so I can fix it quickly.
Get it here: Chrome Web Store | Firefox Add-ons

Full text and comments »

  • Vote: I like it
  • +37
  • Vote: I do not like it

By Leeking, history, 2 months ago, In English

Proposal: Standardized Editorial URLs (/contest/xxxx/editorial) & API Endpoint Support

Finding tutorials for past Codeforces contests is currently far more inconsistent than it needs to be.
Depending on the contest author and round, editorials are scattered across different formats:

For anyone upsolving or building community tools (like browser extensions and problem trackers), this unpredictability causes constant friction.

The Proposal
Introduce a standardized URL alias and API endpoint for contest tutorials.

1. Standardized Web Route
Allow users to access any contest editorial via a single, predictable URL:
codeforces.com/contest/{contestId}/editorial

Practical Implementation & Settings:

  • Contest Manager Settings: In the contest dashboard, coordinators or authors simply enter the blogEntryId (or external link) designated as the official tutorial.
  • Problem-Level Linking & Discussion: Errichto suggested supporting dedicated editorial pages/posts for individual problems (e.g., codeforces.com/contest/1900/editorial/A), giving each problem its own comment section for focused discussion of alternative solutions and edge cases.
  • Multi-resource Support: If there are multiple tutorials (e.g., Official Text, Video Editorial, or Russian/Chinese translations), the main editorial page or alias can render quick tabs/links for each option at the top of the post.
  • Update the UI: Add a prominent "Editorial" button directly on the contest sidebar and on the problem page headers once the contest ends and the tutorial is published.

2. Native API Endpoint (contest.editorial)
Browser extensions, IDE plugins (like Competitive Companion or CPH), and platforms like Vjudge currently rely on fragile web scraping, or regex matching.
Adding an official endpoint, such as contest.editorial in the Codeforces API, would return structured data for a given contest ID:

// Request: https://codeforces.me/api/contest.editorial?contestId=1900
{
  "status": "OK",
  "result": {
    "contestId": 1900,
    "editorialBlogId": 45678,
    "editorialUrl": "https://codeforces.me/blog/entry/45678",
    "videoEditorialUrl": "https://youtube.com/watch?v=...",
    "problemAnchors": {
      "A": "https://codeforces.me/blog/entry/45678#problem-A",
      "B": "https://codeforces.me/blog/entry/45678#problem-B"
    }
  }
}

3. Retroactive Backfilling for Past Rounds
To handle older rounds without manual labor from Codeforces staff:

  • Coordinators, authors, or trusted high-rated users (e.g., Grandmasters) could be given permission to tag/link the historical blog entry ID for older rounds.
  • Alternatively, a simple community-driven backfill tool or PR system could link historical contest IDs to their existing blog entries.

I believe this is a real upgrade. Codeforces needs care and this is great.
A suggestion you may find useful here MikeMirzayanov KAN

Full text and comments »

  • Vote: I like it
  • +127
  • Vote: I do not like it

By Leeking, history, 3 months ago, In English

The last rollback was so long ago that I’ve forgotten when it happened. I want expert so bad

Can we get one soon please MikeMirzayanov KAN

Full text and comments »

  • Vote: I like it
  • +43
  • Vote: I do not like it

By Leeking, history, 6 months ago, In English

Hello Codeforces!

As many of you noticed, recent API changes broke several extensions, including the popular cf-getrating. Since the original creator seems to be inactive (no response to PRs or emails), I have forked and fixed the extension so we can all keep using this functionality.

What is LeekCF-Rating (cf-getrating)

For those unfamiliar, this extension allows you to see the difficulty rating of a problem while keeping problem tags hidden.
Why??: Solve problems 100% on your own. Tags often act as spoilers (e.g., seeing "Dynamic Programming" tells you exactly how to approach the problem)

Check Images

Installation Links:
- Chrome Web Store
- Firefox Addons Store
- GitHub Repository on My Account (Open source for transparency)

If you get a warning from Chrome read this.

Quick Note regarding Chrome Security

I kept the core logic identical to the original but updated the API call methods, icons, and readme to ensure it complies with Store policies and functions with the new Codeforces API changes (So it doesn't mark it up as a copycat).
Feel free to leave suggestions, report issues, or submit a PR on GitHub. Cya on the next blog

icon

Full text and comments »

  • Vote: I like it
  • +20
  • Vote: I do not like it

By Leeking, history, 6 months ago, In English

Almost around 12 rated contests since the last rollback, are we getting one soon? KAN

Full text and comments »

  • Vote: I like it
  • +55
  • Vote: I do not like it

By Leeking, history, 6 months ago, In English

Hi Codeforces team and MikeMirzayanov,

I know maintaining Codeforces is a huge amount of work, especially with the number of submissions and API requests every day, so thanks for all the effort.

I wanted to ask about a small issue with the API. I use it to hide problem tags while solving, so I can try problems completely on my own. Recently, without the API working properly, I can’t reveal the tags with View tags, and I also can’t see the problem rating unless I enable Show tags for unsolved problems on the Problemset page.

Also, could Codeforces maybe support this natively? Ideally, there would be an option to show only the problem rating by default, while keeping the tags hidden behind a button like View tags.

I think this would be useful for people who want to choose problems by rating but avoid spoilers from tags. Thanks again for everything you do for the platform.

Hello

Full text and comments »

  • Vote: I like it
  • +43
  • Vote: I do not like it