Skip to content

Practice Ladder: CF 1100 --> 1400

50 curated problems to solidify fundamentals and break the CF 1400 barrier. Work through each section in order. Solve at least 3-4 per group before moving on.

Quick Revisit

  • SKILL FOCUS: fundamentals -- implementation, sorting, prefix sums, basic DP, BFS/DFS
  • DIFFICULTY: 800--1500
  • PROBLEMS: 50
  • PREREQUISITE: Fundamentals and Essential Techniques

Contents

 Topic Distribution Across the Ladder

 Implementation |########## 5
 Sort + Greedy |########## 5
 Binary Search |########## 5
 Prefix Sums |########## 5
 Basic DP |################ 8
 BFS / DFS |########## 5
 Basic Math |########## 5
 Constructive |########## 5
 Sliding Window |######## 4
 Brute Force |###### 3
 +--+--+--+--+--+--+--+--+--->
 0 1 2 3 4 5 6 7 8

 ^ DP has the most problems -- it deserves the extra reps.

Implementation / Simulation

#ProblemRatingTagsHint
1Watermelon800implThink about when an even number can be split into two even parts.
2Beautiful Matrix800implCount how many moves to reach the center row and center column.
3Odd Divisor900impl, mathA number has no odd divisor only if it is a power of 2.
4Polycarp and Coins800impl, mathMinimize the difference -- use division to split as evenly as possible.
5Even Odds900implOdd numbers come first, then evens -- figure out which half k falls in.

Sorting + Greedy

#ProblemRatingTagsHint
6Towers1000sort, greedyTower count = number of distinct heights; max tower height = max frequency of any height.
7Minimize the Thickness1100greedy, prefixTry every possible first-segment sum, then greedily partition the rest.
8Two Arrays and Swaps1000sort, greedySwap the smallest elements of a with the largest elements of b.
9Collecting Game1100sort, greedy, two-ptrSort the array and use prefix sums to find how far right each starting index can reach.
10Array Replacement1100greedy, sortFor each value, every replacement must be consistent -- check for conflicts.

Binary Search / Two Pointers

#ProblemRatingTagsHint
11Books1400two-ptrClassic sliding window / two-pointer on a contiguous subarray with bounded sum.
12Pair of Topics1400sort, two-ptrRewrite the condition as a[i]-b[i] + a[j]-b[j] > 0, then sort the differences.
13Cellular Network1400binary searchBinary search on the answer r; check if every city is covered.
14Packing Rectangles (CSES)--binary searchBinary search on side length; check if all rectangles fit.
15Factory Machines (CSES)--binary searchBinary search on total time; count how many products can be made.

Prefix Sums / Difference Arrays

#ProblemRatingTagsHint
16Static Range Sum Queries (CSES)--prefix sumBuild a prefix sum array and answer each query in O(1).
17Forest Queries (CSES)--2D prefix sum2D prefix sums -- include/exclude to get rectangle counts.
18Maximum Subarray Sum (CSES)--prefix sum, dpTrack the minimum prefix sum seen so far to maximize the difference.
19Greg and Array1400diff arrayApply a difference array twice: once for operations, once for the actual array.
20Karen and Coffee1400prefix sum, diff arrayUse a difference array to count how many recipes include each temperature.

Basic DP (1D, Knapsack Intro)

#ProblemRatingTagsHint
21Dice Combinations (CSES)--dpdp[i] = sum of dp[i-1..i-6], classic staircase counting.
22Minimizing Coins (CSES)--dp, coin changeUnbounded knapsack -- dp[x] = min coins to make sum x.
23Coin Combinations I (CSES)--dpCount ordered ways -- iterate over coins inside the sum loop.
24Coin Combinations II (CSES)--dpCount unordered ways -- iterate over coins in the outer loop.
25Book Shop (CSES)--dp, 0-1 knapsackStandard 0/1 knapsack: items are books, weight is price, value is pages.
26Boredom1500dpSimilar to house-robber: if you take value k you can't take k-1 or k+1.
27Longest Increasing Subsequence (CSES)--dp, binary searchMaintain a list of smallest tail elements; binary-search to update.
28Vacations1400dpdp[i][last] = max rest days up to day i where last in {none, gym, contest}.

BFS / DFS Basics

#ProblemRatingTagsHint
29Counting Rooms (CSES)--dfs, flood fillFlood-fill each unvisited floor cell; count connected components.
30Labyrinth (CSES)--bfsBFS from start, record parent directions to reconstruct the path.
31Building Roads (CSES)--dfs, graphCount connected components with DFS; you need (components - 1) roads.
32Message Route (CSES)--bfsBFS on unweighted graph gives shortest path; trace back via parent array.
33Building Teams (CSES)--bfs, bipartite2-color the graph with BFS; if a conflict arises the answer is impossible.

Basic Math (GCD, Primes, Modular Arithmetic)

#ProblemRatingTagsHint
34Common Divisors (CSES)--math, gcdCompute the GCD of the entire array by folding pairwise.
35Exponentiation (CSES)--math, modBinary exponentiation modulo 10^9+7.
36Almost Prime900math, sieveSieve to find smallest prime factor, then check if each number has exactly two distinct prime factors.
37T-primes1300math, sieveA number has exactly 3 divisors iff it is the square of a prime.
38Counting Divisors (CSES)--mathFactorize n and use the divisor count formula: product of (e_i + 1).

Constructive / Ad-hoc

#ProblemRatingTagsHint
39Make It Equal1200constructiveYou need at most 2 operations -- think about what values are already present.
40We Were Both Children1300constructive, sieveFor each jump length d, mark positions d, 2d, 3d, ... -- sieve-like.
41Gray Code (CSES)--constructive, recursionReflect-and-prefix: recurse on n-1 bits, mirror, and prepend 0/1.
42Permutations (CSES)--constructivePlace all even numbers first, then all odd numbers (or vice versa).
4301 Game1000ad-hocCount adjacent 0-1 pairs; the game outcome depends on the parity of removals.

Sliding Window

#ProblemRatingTagsHint
44Subarray Sum Queries (CSES)--segtreeNote: this is a segment tree problem, not sliding window — included as a stretch task. Each node stores max prefix, suffix, total, and best subarray; merge children carefully.
45Sum of Two Values (CSES)--two-ptr, hashmapSort with original indices and shrink with two pointers, or hash one pass for the complement.
46Greedily Increasing Subsequence1100sliding window, greedyCount the number of "01" transitions in the string, then add 1.
47Playlist (CSES)--sliding window, setExpand right while values are unique (use a set); shrink left on duplicates.

Complete Search / Brute Force

#ProblemRatingTagsHint
48Chessboard and Queens (CSES)--backtrackingN-queens with blocked cells -- backtrack column by column, check diagonals.
49Apple Division (CSES)--brute force, bitmaskWith n <= 20, enumerate all 2^n subsets and track the minimum difference.
50Creating Strings (CSES)--brute force, permutationGenerate all distinct permutations in lexicographic order (next_permutation).

Mental Traps

Drawn from the companion reflection.

"I'm not learning anything hard, so I'm not improving." This is the most damaging thought at this level. Problems here teach things harder to learn than algorithms: careful reading, time-pressure management, testing discipline, the habit of thinking before coding. These foundations either accelerate or limit everything that comes after. Rushing through this ladder to reach the "real" stuff is building a house on sand.

Grinding AC count instead of building skill. You get AC, then immediately move to the next problem. That's farming solves, not building recognition. After each solve -- especially one you struggled with -- spend 5 minutes: write one sentence about why your approach worked and what the key insight was.

Solving the same problem type on repeat. Your solved list is 30 sorting problems, 15 prefix-sum problems, and 5 of everything else. Deliberate practice requires variety. If you gravitate to familiar categories, you're maintaining skill, not building it.

Always needing 2-3 WA submissions before AC. At this level you should get AC on the first submission for problems at or below your rating. If you consistently need multiple submissions, testing discipline is the bottleneck -- not algorithm knowledge. Fix this before moving on.

 Difficulty Curve Within Each Section

 Hard | /
 | *-/
 | /
 Med | *-/ <-- most learning happens here
 | /
 Easy |*
 +----+----+----+----+----+--->
 P1 P2 P3 P4 P5

 ^ Each section ramps from easy to hard.
 Start at the TOP of each section, not randomly.
 If P1 is trivial, good -- it confirms the basics.

What the Code Won't Teach You

Work with time pressure. Taking 3 hours on a 1200-rated problem doesn't prepare you for solving it in 15 minutes under contest conditions. Set a timer: 45 min at 1200-rated, 60 min at 1300-rated. If you don't finish, stop anyway and analyze why you stalled.

Build your own edge cases. Don't just verify against provided samples. After passing samples, test: n=1, all elements equal, sorted order, reverse sorted order, maximum constraints. Problems at this level are routinely caught by exactly these five tests.

Don't read the editorial on the first day. Timer goes off, you're stuck -- wait until the next day. The minimum struggle time for genuine learning is 45 minutes. Reading the editorial after 10 minutes of frustration teaches you a solution, not a problem-solving skill.

The ladder is not a substitute for virtual contests. The ladder is a study tool; virtual contests test performance under pressure. Both are necessary. If you've solved 200 ladder problems but haven't done a virtual contest in a month, you've been practicing without performing.

Stay within +0 to +300 of your current rating. Problems rated 200+ below your level produce almost no growth -- they're too easy to force new thinking. Avoid comfort-solving.


How to Use This Ladder

  1. Work top-to-bottom within each section. Problems are ordered from easier to harder.
  2. Time-box each problem to 30-45 minutes. If stuck, read the hint, then try for 15 more minutes.
  3. After solving (or giving up), read the editorial and at least one accepted solution.
  4. Track your solves. Aim for >= 40/50 before moving to the 1400 --> 1700 ladder.
  5. Revisit weak sections. If a topic gives you trouble, supplement with 3-5 more problems from that tag on Codeforces.

Self-Test: Meta-Skills Checkpoint

Before advancing to the 1400 --> 1700 ladder, honestly verify these meta-skills:

  • [ ] I can explain why my approach works for any problem I solved -- not just "I tried X and it passed"
  • [ ] I consistently get AC on first submission for problems at or below my current rating
  • [ ] I have a working stress-test setup and have used it on at least 5 problems
  • [ ] I time myself on every problem and my average solve time is decreasing week over week
  • [ ] I have completed at least 3 virtual contests with upsolving at this level
  • [ ] I can name the pattern trigger for each major topic (e.g., "binary search because the condition is monotone")
  • [ ] I record a short analysis after every problem -- what worked, what the key insight was
 Expected Rating Progression

 1400 | *------->
 | *--/
 1350 | *--/
 | *--/
 1300 | *--/
 | *-/
 1250 | *--/
 | *--/
 1200 |*--/
 |/
 1100 +*
 +----+----+----+----+----+----+----+----+---->
 0 5 10 15 20 25 30 35 40
 Problems Solved

 * = expected progress -------> = ready for next ladder
 Plateaus are normal. Dips happen. The trend matters.

The headline lesson

At 1400, you don't need new algorithms. You need faster fingers and cleaner thinking.

You already know enough algorithms for this band. The skill being trained is recognition speed and implementation discipline: solve A+B in under 15 minutes, identify the problem type within 3 minutes, get it right on the first submission. Every section above is built around that.

If you solve 3 problems per contest but always take 1:30+ while peers finish in 0:50, the gap is not knowledge — it's that you re-derive everything from scratch instead of having templates and patterns ready. The fix is reps, not new theory.


Next ladder: 1400-1700 | Topic drills: DP Ladder, Graph Ladder | Contest practice: Mock Contest 1

Built for the climb from Codeforces 1100 to 2100.