摘要:
对每一个宗教建一棵线段树,然后树剖搞搞 cpp include include using namespace std; int n, m, w[100005], c[100005], uu, vv, hea[100005], cnt, dep[100005]; int fa[100005], to 阅读全文
posted @ 2018-01-24 21:01
poorpool
阅读(163)
评论(0)
推荐(0)
摘要:
树状数组不用动脑子真爽啊 cpp include include include using namespace std; typedef long long ll; int m, n, b[100005], rem, rot[100005], lson[20000005], rson[200000 阅读全文
posted @ 2018-01-24 19:38
poorpool
阅读(125)
评论(0)
推荐(0)
摘要:
前置技能:Count on a tree 然后带上一个启发式合并 cpp include include include using namespace std; int n, m, orz, uu, vv, ww, a[80005], b[80005], rnk[80005], rem, cnt, 阅读全文
posted @ 2018-01-24 16:02
poorpool
阅读(180)
评论(0)
推荐(0)
摘要:
二合一…… 阅读全文
posted @ 2018-01-24 10:51
poorpool
阅读(143)
评论(0)
推荐(0)
摘要:
前置技能 :HDU3376 Matrix Again 所以看到这个题,我们也会想着用最大费用最大流解决,因为从起点飞到终点再飞回来,就等于从起点飞两次到终点且这两次飞行除了起点终点之外没有访问超过一次的点。 考虑拆点限流,除起点终点以外的点容量是1(花费代表边权),起点终点容量是2。 输出方案的话, 阅读全文
posted @ 2018-01-24 08:10
poorpool
阅读(122)
评论(0)
推荐(0)

浙公网安备 33010602011771号