随笔分类 -  组合数学-Lucas定理

摘要:Lucas定理:用于计算组合数模除素数后的值,其实就是把(n,m)分别表示为p进制,累乘各位的可能取的个数,得到最终的结果; 推论:(n & m) == m则C(n,m)为奇数;即C(n,m) %2 = 1,即m二进制的每一位n都必须为1,所以n & m = m; 应用: Xiao Ming's H 阅读全文
posted @ 2016-03-01 20:39 hxer 阅读(268) 评论(0) 推荐(0)
摘要:DP? Problem Description Figure 1 shows the Yang Hui Triangle. We number the row from top to bottom 0,1,2,…and the column from left to right 0,1,2,….If 阅读全文
posted @ 2016-03-01 17:39 hxer 阅读(237) 评论(0) 推荐(0)