摘要: 题目链接 "bzoj4668: 冷战" 题解 按秩合并并查集,每次增长都是小集合倍数的两倍以上,层数不超过logn 查询路径最大值 LCT同解 代码 c++ include using namespace std; inline int read() { int x = 0,f = 1; char 阅读全文
posted @ 2018-07-19 19:24 zzzzx 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 题目链接 "bzoj1211: [HNOI2004]树的计数" 题解 prufer序 可重排列计数 代码 c++ include using namespace std; define int long long int n = 0; int b[10007]; int cnt[10007]; vo 阅读全文
posted @ 2018-07-19 19:21 zzzzx 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 题目链接 "bzoj1037: [ZJOI2008]生日聚会Party" 题解 dp[i][j][x][y] 有i个男生j个女生其中任意一段男生最多比女生多x个 女生最多比男生多y个 注意一下边界...有点毒 苟活者在淡红的血色中会依稀看到微茫的希望 代码 c++ include using nam 阅读全文
posted @ 2018-07-19 19:12 zzzzx 阅读(589) 评论(2) 推荐(0) 编辑
摘要: 密码你猜的到的 阅读全文
posted @ 2018-07-19 17:15 zzzzx 阅读(71) 评论(16) 推荐(2) 编辑
摘要: 题目链接 "HDU 5833 Zhu and 772002 高斯消元" 题解 完全平方数有因子的偶数次幂乘积构成 对于因数个数这就构成了%2意义下的方程组,对于因子列异或方程组 求自由元的自由组合方案数 因为不是很熟悉bitset加上hdu巨坑评测机,然后调了一下午? 代码 c++ include 阅读全文
posted @ 2018-07-19 16:23 zzzzx 阅读(160) 评论(0) 推荐(0) 编辑