Combinatorics -> Bounded Compositions
Distribute sums under lower and upper bounds using stars and bars, generating functions, or inclusion-exclusion.
- Topic slug:
combinatorics/bounded-compositions
- Tutorial page: Open tutorial
- Ladder page: Open ladder
- Repo problems currently tagged here:
1
- Repo companion pages:
0
- Curated external problems:
6
Microtopics
- stars-and-bars
- lower-bounds
- upper-bounds
- bounded-sums
- compositions
- generating-functions
- PIE
Learning Sources
Practice Sources
Curated External Problems
Core
| Problem |
Source |
Difficulty |
Context |
Style |
Prerequisites |
Tags |
Why it fits |
| Coins |
AtCoder |
Easy |
Coin-Change |
Brute Force; Counting |
Nested Loops; Case Analysis |
Bounded Composition; Coin Sums |
A tiny bounded-composition problem where all constraints are small enough to enumerate. |
| Distributing Apples |
CSES |
Easy-Medium |
Stars-And-Bars, Bounded Counting |
Math; Combinatorics |
Combinations |
Nonnegative Parts; Combinations |
The cleanest unconstrained composition baseline. |
| M - Candies |
AtCoder |
Medium |
Prefix DP |
- |
- |
Upper Bounds; Children And Candies; DP |
A canonical bounded-distribution DP. |
| D - Between Two Arrays |
AtCoder |
Hard |
Prefix DP |
- |
- |
Nondecreasing Arrays; Range Bounds; Mod 998244353 |
Counting bounded monotone sequences with DP. |
Practice
| Problem |
Source |
Difficulty |
Context |
Style |
Prerequisites |
Tags |
Why it fits |
| How Many Ways? |
AtCoder |
Medium |
Triple-Counting |
Counting; Brute Force |
Case Analysis; Sum Constraints |
Triples; Sum Constraint |
A small but useful constrained-composition style problem over ordered triples. |
| Tak and Cards |
AtCoder |
Medium |
Subset Sum |
DP; Counting |
Cardinality Constraints |
Sum Constraints; Card Selection |
A good bridge from composition thinking to constrained subset counting. |
Repo Problems
| Code |
Title |
Fit |
Difficulty |
Pattern |
Note |
Solution |
VOSFENCE |
Xay hang rao |
primary |
hard |
bounded compositions; run decomposition; gap distribution |
Note |
Code |
Regeneration
python3 scripts/generate_problem_catalog.py