摘要: Range Reachability Query 题目链接:https://acm.hdu.edu.cn/showproblem.php?pid=7171 给定一张有向图,每次询问只经过编号在[l,r]范围的边的情况下,点对是否能够到达。 设$f[i][j]$表示$i$点能否只经过$[l_j,r_j 阅读全文
posted @ 2022-08-10 16:16 comld 阅读(46) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://acm.hdu.edu.cn/showproblem.php?pid=7192 LCT维护一下fail树形态,询问时把删除部分和没有被删除的部分交线附近暴力匹配一下。 #include<bits/stdc++.h> #define N 400009 using namesp 阅读全文
posted @ 2022-08-10 15:49 comld 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://acm.hdu.edu.cn/contest/problem?cid=1050&pid=1011 大意就是求一个权值和最大的连通块,其直径不超过k。 似乎是个很常见的经典题,dp状态和深度有关,用长链剖分合并一下。 #include<bits/stdc++.h> #defi 阅读全文
posted @ 2022-08-10 15:45 comld 阅读(24) 评论(0) 推荐(0) 编辑