How many ways to pick AT MOST k elements from n elements?

Revision en1, by PUSSY_LICKING_LOLI_69, 2024-09-26 06:08:37

Given a fixed k (k<=1e6), make an array F of size n (n<=1e6) , with F[i] be the number of ways to pick AT MOST k elements from i elements.

Is there a way to create this array efficiently?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English PUSSY_LICKING_LOLI_69 2024-09-26 06:08:37 249 Initial revision (published)