摘要: Jennie k是给定的 把m和n扔到一个坐标系里 成了二维的了,我们又都知道$Cm_n=c_{n-1}{m-1}+c_{n-1}^m$ 然后求和那个奇特的范围 这就是个二维的前缀和啊 #include<iostream> #include<cstdio> #include<algorithm> # 阅读全文
posted @ 2021-10-07 14:05 Simex 阅读(40) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include #include #define int long long struct co{ int p; int c; int d; }c[500005]; int n,k,m; struct pp{ 阅读全文
posted @ 2021-10-07 13:56 Simex 阅读(26) 评论(0) 推荐(0) 编辑
摘要: auto 是非常强的东西 ++k这种东西会在执行完整个语句后+1 unordered_map<>单纯的hash random_shuffle ()随机打乱一个序列 混着cin和getchar并且关闭流同步会出事 期望是概率的倒数 碰到异或题考虑按位处理 多组数据一定要读完数据!! 树状数组就像是一个 阅读全文
posted @ 2021-10-07 13:55 Simex 阅读(38) 评论(0) 推荐(0) 编辑
摘要: Jennie 这也就是个裸的一批的换根dp #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> #include<queue> #include<stack> #include<map> #define 阅读全文
posted @ 2021-10-07 13:43 Simex 阅读(25) 评论(0) 推荐(0) 编辑
摘要: Lisa 先想一个朴素的 dp $f_{i,j}$表示前 \(i\) 个把 \(i\) 放在子序列 \(j\) 位的方案数,显然我们的 \(j\) 不是 $a_i$的因数的时候 会直接从上一位继承下来 是不是有 背包那味了 对于每一个 \(a_i\) 我们分解质因子再转移 #include<iost 阅读全文
posted @ 2021-10-07 13:38 Simex 阅读(32) 评论(0) 推荐(0) 编辑