Digitalise Agency

codeforces-mashup-generator

Codeforces Mashup Generator

Codeforces is a site full of programming puzzles, and our founder's study group ran practice contests on them. The problem: someone had usually already solved one of them, spoiling the contest. This tool picks instead: it looks up what every member has solved, keeps only puzzles nobody has done, filters by difficulty and topic, and writes the shortlist to an Excel sheet. One verified live run took about 14 seconds.

Solo

Solo work by our founder, Salman Adnan.

Rating Ladder: an artwork of what the tool picks out. Programming puzzles rain down sorted by difficulty, and the few nobody in the group has already solved rack up into one fair practice contest. Live and interactive: drag it to orbit, scroll or pinch to zoom. Open full screen
Real output from a live run against the Codeforces API: a generated practice contest.
Live run: 9 problems pulled from the real Codeforces API.
800-2000rating band, step 100
~14 sverified live run
2Codeforces API endpoints

Overview

A single-script tool that builds fair mashup contests for a study group by querying the public Codeforces API, filtering the problemset by rating band, tags, and solver history, then writing candidate problems to an Excel sheet.

Key features

  • Filter by any set of rating bands (default 800 to 2000 in steps of 100).
  • An include filter (keep only problems solved by a trusted handle) and an exclude filter (drop any problem solved by a group member).
  • Tag filtering with four modes.
  • Uses two endpoints, problemset.problems and user.status (paginated 10,000 submissions at a time), reducing both to (contestId, index) identity sets.
  • Output is a flat Excel sheet via pandas and openpyxl.

Results

A verified small run against the live API took about 14 seconds and produced 9 rows (3 per rating), all tagged greedy, none solved by the two excluded members, all solved by the trusted handle; two stale handles returned HTTP 400 and the sheet still generated.

Tech stack

  • Python 3.10+ (tested on 3.12)
  • requests
  • argparse
  • pandas + openpyxl

Book a call

Let's talk about what you're building.

Pick a slot below.