Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.

Roadmap · Foundations

Competitive programming

Opens with credits

For students who want to play competitive programming as a sport, on Codeforces, AtCoder and in ICPC, from a first contest to a regional with their university team. By the end you can write fast, correct C++ under a timer, recognise the standard techniques at your rating, learn from every contest by upsolving and play a five-hour team round with a plan.

Curated by Tauseef Fayyaz10 stages, 60 topics~9 months at a few hours a week

By the end, you will be able to

  • Write contest C++ with the STL from a template you know by heart, and read the constraints to pick a complexity before writing any code
  • Recognise and implement the core techniques for your rating band: maths basics, greedy with proofs, binary search, prefix sums, graphs, DP and range structures
  • Take part in rated contests regularly and upsolve the problem just above your level after each one
  • Find your own bugs with edge cases, sanitizers and stress tests instead of guessing
  • Play an ICPC-style five-hour team contest with clear roles, problem triage, penalty awareness and a tested team notebook

The path

10 stages, in the order to learn them. Open one to start.

  1. 1C++ for contestsSet up a compiler and a template, learn the STL containers and algorithms contests use every day, and learn to read constraints so you know what complexity you can afford.7 topics · ~3 weeks
  2. 2Maths basicsLearn the number theory easier contests use: modular arithmetic, gcd, primes and divisors, fast powers, and spotting invariants such as parity.6 topics · ~3 weeks
  3. Greedy and sortingLearn to make the locally best choice, prove it is safe with an exchange argument, and use sorting to turn messy problems into one pass. Build the habit of checking ideas with a brute force.6 topics · ~4 weeksOpens with credits
  4. Binary searchSearch sorted data with the STL, then learn the bigger idea: binary searching over the answer whenever a yes or no check only flips once.5 topics · ~3 weeksOpens with credits
  5. Prefix sums and two pointersAnswer range sums in O(1), apply many range updates in O(1) each, and walk two indexes through an array to count or find subarrays in linear time.5 topics · ~3 weeksOpens with credits
  6. GraphsStore graphs as adjacency lists, traverse them with BFS and DFS, treat grids and trees as graphs, and find weighted shortest paths with Dijkstra. At higher levels, add topological order and lowest common ancestors.6 topics · ~5 weeksOpens with credits
  7. Dynamic programmingLearn to define a state and a transition, fill a table in the right order and recognise the classic DP shapes: linear, grid and knapsack, then LIS, bitmask DP and DP on trees.5 topics · ~6 weeksOpens with credits
  8. Data structuresMeet disjoint set union, Fenwick trees and segment trees, understand what each is for, and write each once. You will use them properly after a few months of contests.5 topics · ~5 weeksOpens with credits
  9. Contest strategy and upsolvingTake part in rated contests regularly, spend contest time well, read verdicts correctly, find bugs with stress tests and learn from every contest by upsolving the problem just above your level.8 topics · ~4 weeksOpens with credits
  10. Team play and ICPCLearn how the ICPC works, from registration and eligibility to scoring, penalty time and the frozen scoreboard, and train as a team of three on one computer with roles, triage and a tested team notebook.7 topics · ~4 weeksOpens with credits
Keep reading

8 more stages, 47 more topics, free with an account.

You have seen the open stages of the Competitive programming roadmap. Every topic it covers is listed above, and an account opens the rest: what each topic means, a question to check yourself, the courses, the practice and Tauseef's advice for every stage. Early access is open: sign up and your account is active shortly after.

Everything here is free to learn from. A few things, like adding a roadmap, keeping a cheat sheet or asking Tauseef a question, use credits. You get 15 when you join, your first roadmap is free, and if you are learning seriously and run out, you can ask for more. Credits only make sure the platform goes to people who are actually learning.

Build a project

A finished project proves more than a certificate.

Picked from the other libraries by shared topics.

Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.

  • 1:1 Mentorship
  • Fresh Graduate Mentorship
  • Career Guidance

Brand deals, promos and partnerships: tauseeffayyaz@gmail.com