摘要: 四个基本计数原理 划分:集合S的一个划分是它的子集$S_1,S_2,S_3…S_m$ 使每个元素恰好只属于其中的一个子集。 加法原理:\(|S| = |S_1| + |S_2| + |S_3| +...+|S_m|\) 乘法原理 :设$S$是有序对$(a,b)$的集合,对象$a$来自大小为$p$的集 阅读全文
posted @ 2020-09-05 21:43 ke_xin 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 卢卡斯Lucas 模板 证明戳这里 好吧背过就好反正就一行 #include<bits/stdc++.h> #define N 100010 using namespace std; typedef long long ll; ll fac[N]; int T,p,n,m; ll qpow(ll a 阅读全文
posted @ 2020-09-05 21:25 ke_xin 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 小a的强迫症 其实很简单 就是每个颜色i在前面的所有珠子中选 num[i]-1个位置,\(C(\sum num[i] ~-1,num[i]-1)\) #include <iostream> #include <cstdio> using namespace std; #define int long 阅读全文
posted @ 2020-09-05 20:10 ke_xin 阅读(32) 评论(0) 推荐(0) 编辑