
组合计数
吴俊达9812
这个作者很懒,什么都没留下…
展开
-
P4492 [HAOI2018]苹果树
枚举每条边的贡献来进行统计。 树上统计的常用方法:用边将树分割成两个部分。 #include <bits/stdc++.h> using namespace std; typedef int lint; typedef long long LL; const int maxn = 2005; int mod; LL C[maxn][maxn],frac[maxn],dp[max...原创 2019-08-11 10:57:48 · 154 阅读 · 0 评论 -
BZOJ3294: [Cqoi2011]放棋子
思路:明确一个事实就是一种颜色其实最终的状态是占了几行几列。 坑点:最开始把maxn弄混了,然后数组开的特别大,bzojT掉了。话说数组开大为什么会T啊。。 #include <bits/stdc++.h> using namespace std; typedef int lint; typedef long long LL; const int maxn = 2005; con...原创 2019-08-11 14:47:36 · 103 阅读 · 0 评论