report VI VI EN
Register | Login
  • HOME
  • PROBLEMSET
  • ROADMAP
  • COMPETITION
  • TOPIC
  • RANKING
  • GUIDE
  • MASHUP
  • ABOUT
  • CONTACT
  • Problem
  • Submit
  • Results
Equation - MarisaOJ: Marisa Online Judge

Equation

Time limit: 1000 ms
Memory limit: 256 MB
Count the number of integer solutions to the following equation: $$x_1 + x_2 + ... + x_k = n$$ with $x_i \ge p$. ### Input - A single line contains 3 integers $n, k, p$. ### Output - Print the number of solutions, modulo $10^9+7$. ### Constraints - $1 \le n, k, p \le 10^6$. ### Example Input: ``` 8 3 1 ``` Output: ``` 21 ```
Introduction to combinatorics
Binomial coefficient
Fork and knife
Binomial coefficient 2
Equation
Array rearrangement
Value of subsequences
Inequation
Growing mushrooms
Binary matrix
Broken board
Triangles counting
Minecraft graph
Restricted path
Heavenly Peach Garden
Topic
Math
Combinatorics
Rating 1300
Solution (0) Solution