Rosetta Problems

上限付きの和の分け方

NN 個の非負整数 xix_i を 0≤xi≤ai0 \leq x_i \leq a_i かつ総和が KK になるように選ぶ方法の数を求める。

関連リンク