
组合数学
ナナ色のブランク
这个作者很懒,什么都没留下…
展开
-
组合数学中杨辉三角与二项式定理以及代码实现
首先给出杨辉三角(也叫帕斯卡三角形数阵,但我们中国比他早300年)如上图,可以发现三角两边都是1,而中间的数都是上面两个数的和,满足dp[i][j]=dp[i-1][j]+dp[i-1][j-1]这样的递推关系。 然后再来看(a+b)n(a+b)^{n}(a+b)n,将它展开会得到: (a+b)0=1(a+b)^{0}=1(a+b)0=1 (a+b)1=a+b(a+b)^{1}=a+b(a+b)...原创 2020-03-21 15:24:42 · 555 阅读 · 0 评论 -
Kyoya and Colored Balls(组合数学)
Kyoya Ootori has a bag with n colored balls that are colored with k different colors. The colors are labeled from 1 to k. Balls of the same color are indistinguishable. He draws balls from the bag one...原创 2020-03-19 19:25:27 · 333 阅读 · 0 评论