上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 22 下一页
摘要: "P1040 加分二叉树" 对于有些dp来说,记忆化的正向思维会使人更好理解233. cpp include include include using namespace std; long long memory[50][50]; int root[50][50]; long long data 阅读全文
posted @ 2018-05-21 21:24 Lance1ot 阅读(152) 评论(0) 推荐(0) 编辑
摘要: "P2055 [ZJOI2009]假期的宿舍" 建图是件难事233. 阅读全文
posted @ 2018-05-21 21:14 Lance1ot 阅读(150) 评论(9) 推荐(0) 编辑
摘要: "P1726 上白泽慧音" 缩点的模板。 因为数据范围很小,所以对于输出方案的判断就可以很水。 cpp include include include include using namespace std; vectorline[5010]; int dfn[5010],low[5010],tim 阅读全文
posted @ 2018-05-21 21:10 Lance1ot 阅读(184) 评论(0) 推荐(0) 编辑
摘要: "P1772 [ZJOI2006]物流运输" SPFA+DP 常数奇大的线段树维护那些天不能走 cpp // luogu judger enable o2 include include include include include using namespace std; vectorline[ 阅读全文
posted @ 2018-05-20 08:45 Lance1ot 阅读(111) 评论(0) 推荐(0) 编辑
摘要: "P2962 [USACO09NOV]灯Lights" 看完题面,我马上~~趁教练不注意 打开了某399小游戏。熟练地找到了这个 "游戏" 。颓废了一上午~~ 就想到怎么做了。 "233" 对于一个灯和所以与他相连的等灯。每个灯只有按和不按两种情况。为什么呢? 如果同一盏灯按了两次。就跟没按时一样的 阅读全文
posted @ 2018-05-20 08:32 Lance1ot 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 这个题我们可以使用树状数组做 啥? 树状数组? 那个不是维护前缀和的东西吗? 各位看官,让我慢慢道来。 首先我们可以想到,对于一个询问$ [l,r] $,只有$[1,r]$中的数可能对这个询问有影响。 这就启示我们可以按照询问的右端点进行一波升序排序。 不过这和树状数组有什么关系呢? 对于同一个数$ 阅读全文
posted @ 2018-05-20 08:04 Lance1ot 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 6个点ac cpp include include include include include using namespace std; struct node nil; struct node { int val; int size; int num; int key; node ch[2]; 阅读全文
posted @ 2018-05-16 21:53 Lance1ot 阅读(183) 评论(0) 推荐(0) 编辑
摘要: "Splay" 阅读全文
posted @ 2018-05-16 18:23 Lance1ot 阅读(175) 评论(0) 推荐(0) 编辑
摘要: "P1345 [USACO5.4]奶牛的电信Telecowmunication" 实际上是求点割。 我们可以将一个点拆成两个点,其中只有一条、容量为1的边。 然后求最小割。最小割等于最大流233 dinci就 ok 了 cpp include include include include incl 阅读全文
posted @ 2018-05-15 19:01 Lance1ot 阅读(139) 评论(0) 推荐(0) 编辑
摘要: "P3381 【模板】最小费用最大流" cpp include include include include include using namespace std; struct node { int point; int value; int flow; int nxt; }; node li 阅读全文
posted @ 2018-05-14 20:12 Lance1ot 阅读(125) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 22 下一页