摘要: 题目链接 "bzoj1491: [NOI2007]社交网络" 题解 n^3枚举一下就没了... 代码 c++ include include include inline int read() { int x = 0,f = 1 ; char c = getchar(); while(c '9')c 阅读全文
posted @ 2018-08-23 21:29 zzzzx 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 题目链接 "CF915E Physical Education Lessons" 题解 动态开点线段树 代码 c++ / 动态开点线段树 / include include include inline int read() { int x = 0,f = 1; char c = getchar() 阅读全文
posted @ 2018-08-23 19:22 zzzzx 阅读(442) 评论(0) 推荐(0) 编辑
摘要: 题目链接 "bzoj4407: 于神之怒加强版" 题解 求这个东西 $$\sum_{i=1}^n\sum_{j=1}^m\gcd(i,j)^k$$ 然后是套路 $$ \begin{aligned}\sum_{i=1}^n\sum_{j=1}^m\gcd(i,j)^k &=\sum_{d=1}^{mi 阅读全文
posted @ 2018-08-23 19:19 zzzzx 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 题目链接 "bzoj4337: BJOI2015 树的同构" 题解 树哈希的一种方法 对于每各节点的哈希值为hash[x] = hash[sonk[x]] p[k]; p为素数表 代码 阅读全文
posted @ 2018-08-23 19:01 zzzzx 阅读(392) 评论(0) 推荐(0) 编辑