摘要: 题目: [CF Edu 80] Red-Blue Graph 链接:https://codeforces.com/contest/1288/problem/F 分析: 原来在费用流里必选一条边还能用-inf来控制,原谅我孤陋寡闻了 #include <bits/stdc++.h> using nam 阅读全文
posted @ 2020-01-27 04:57 hjj1871984569 阅读(247) 评论(0) 推荐(0) 编辑
摘要: CERC 2017 Intrinsic Interval scc 线段树优化建图 扫描线 线段树 析合树 lca 阅读全文
posted @ 2020-01-09 19:33 hjj1871984569 阅读(300) 评论(0) 推荐(0) 编辑
摘要: 题目:Economic Difficulties 传送门:https://codeforces.com/contest/1263/problem/F 题意:给了两棵tree:Ta(拥有a个节点,节点编号为[n+1, n+a]) Tb(拥有b个节点, 节点编号: [n+ a + 1, n + a + 阅读全文
posted @ 2019-12-02 23:56 hjj1871984569 阅读(318) 评论(0) 推荐(0) 编辑
摘要: 题目:卡牌配对 传送门:None 题目大意:有$n_1$张$X$类牌和$n_2$张$Y$类类牌,每张卡牌上有三个属性值:$A,B,C$。两张卡牌能够配对,当且仅当,存在至多一项属性值使得两张卡牌该项属性值互质,且两张卡牌类别不同。每张卡牌只能用一次,最大化匹配上的卡牌组数。 分析: 做法一:直接上二 阅读全文
posted @ 2019-11-10 17:06 hjj1871984569 阅读(262) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/meowww/archive/2017/02/27/6475952.html 阅读全文
posted @ 2019-07-30 01:35 hjj1871984569 阅读(93) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/fenghaoran/p/dominator_tree.html https://www.cnblogs.com/meowww/archive/2017/02/27/6475952.html http://cogs.pro:8080/cogs/prob 阅读全文
posted @ 2019-07-30 00:01 hjj1871984569 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 存个板子 阅读全文
posted @ 2019-07-17 22:05 hjj1871984569 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 二叉树: CodeForces - 339D(题解) 单点修改区间查询 HDU - 1166 、HDU - 1394、*POJ - 2886、HDU - 1754、HDU - 2795 区间修改区间查询 HDU - 1698、POJ - 3468(树状数组做法)、POJ - 2528、POJ - 3 阅读全文
posted @ 2019-02-24 21:58 hjj1871984569 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 题目:Parking Lot 传送门:http://codeforces.com/problemset/problem/46/D 分析: 做法一: 1)这题和Hotel那题一样,也可以看做是求区间空位的问题,不过相对于Hotel那题细节会更多一些。 2)头和尾是不用考虑前和后是否有车的,但可以在$- 阅读全文
posted @ 2019-02-24 15:37 hjj1871984569 阅读(230) 评论(0) 推荐(0) 编辑
摘要: 题解:Trips 传送门:http://codeforces.com/contest/1037/problem/E 分析: 1)正向建图搞鼓半天不会做。 2)那离线?反向建图? 3)删掉去不了的人,同时删掉相连的边。 4)就是一个奇特的类似拓扑的过程。 5)可以利用$std::set$存边删边。 阅读全文
posted @ 2019-02-19 22:25 hjj1871984569 阅读(160) 评论(0) 推荐(0) 编辑