2018年8月4日

洛谷 1083 (NOIp2012) 借教室——标记永久化线段树 / 差分+二分

摘要: 题目:https://www.luogu.org/problemnew/show/P1083 听说线段树不标记永久化会T一个点。 注意mn记录的是本层以下、带上标记的min! #include<iostream> #include<cstdio> #include<cstring> #include 阅读全文

posted @ 2018-08-04 20:34 Narh 阅读(302) 评论(0) 推荐(0) 编辑

洛谷 3398 仓鼠找sugar——树链剖分

摘要: 题目:https://www.luogu.org/problemnew/show/P3398 原来只要把值记录成第几次就行了。 别忘了while(top[a]!=top[b])之后还要走一步。 阅读全文

posted @ 2018-08-04 19:14 Narh 阅读(167) 评论(0) 推荐(0) 编辑

洛谷 2055 [ZJOI2009]假期的宿舍——二分图匹配

摘要: 题目:https://www.luogu.org/problemnew/show/P2055 阅读全文

posted @ 2018-08-04 18:04 Narh 阅读(133) 评论(0) 推荐(0) 编辑

导航