随笔 - 530  文章 - 0  评论 - 3  阅读 - 10098 
10 2023 档案
[ABC256E] Takahashi's Anguish
摘要:题目 https://www.luogu.com.cn/problem/AT_abc256_e 图论题,是个环套树 发现环上的边要取掉一条(min),其他的不用取 https://www.luogu.com.cn/record/131488937 阅读全文
posted @ 2023-10-25 13:01 towboat 阅读(5) 评论(0) 推荐(0) 编辑
AT_abc260_e
摘要:给出 n 对点 ai ,bi ,在[1,m] 之间取一段区间。 当每一对点都有一个点在这个区间内时,这个区间合法。 求出不同长度的合法区间分别有多少个。 枚举 l, 右边r有个最小值R(l), 而 (l, j) j>r 之后的点都是合法点, 后面就是区间加,用差分维护 考虑这个 R (l) , 可以 阅读全文
posted @ 2023-10-23 22:21 towboat 阅读(10) 评论(0) 推荐(0) 编辑
AT_abc266_f
摘要:基环树标记环上的点 https://www.luogu.com.cn/record/130531354 阅读全文
posted @ 2023-10-20 12:12 towboat 阅读(4) 评论(0) 推荐(0) 编辑
[ABC267F] Exactly K Steps
摘要:多次询问 给出x,给出任意点y满足 dis(x,y)==m 以直径端点为根,dfs 可以发现 至少有一个y 在这个路径上 https://www.luogu.com.cn/record/130467795 阅读全文
posted @ 2023-10-19 22:20 towboat 阅读(7) 评论(0) 推荐(0) 编辑
分层图的题目
摘要:https://www.luogu.com.cn/problem/AT_abc277_e 阅读全文
posted @ 2023-10-16 21:44 towboat 阅读(4) 评论(0) 推荐(0) 编辑
分块1
摘要:区间加法,询问区间 [ l , r ] 内小于 值 x 的元素个数 https://loj.ac/s/1907013 阅读全文
posted @ 2023-10-08 15:28 towboat 阅读(4) 评论(0) 推荐(0) 编辑
CF1850H
摘要:带权并查集板题 维护到根的距离 #include <iostream> #include <algorithm> #include <cstring> #include <vector> #include <queue> using namespace std; const int N =2e5+1 阅读全文
posted @ 2023-10-05 21:29 towboat 阅读(5) 评论(0) 推荐(0) 编辑
AT_abc291_f
摘要:01bfs 跑完d1 ,d2 ( 单源最短路 枚举 中间点(去掉的点 #include <iostream> #include <algorithm> #include <vector> #include <queue> #include <map> using namespace std; con 阅读全文
posted @ 2023-10-04 20:39 towboat 阅读(2) 评论(0) 推荐(0) 编辑
并查集的操作(update
摘要:maintain block size: fa[fy]=fx; sz[fx]+=sz[fy],sz[fy]=0; 阅读全文
posted @ 2023-10-03 15:26 towboat 阅读(1) 评论(0) 推荐(0) 编辑
边权转点权
摘要::边权存储在dep较大的点,转化为点权问题 注意区间查询时,如果当前x,y在一条重链上时的情况 https://www.luogu.com.cn/problem/P1967 https://www.luogu.com.cn/problem/AT_abc294_g https://darkbzoj.c 阅读全文
posted @ 2023-10-02 18:32 towboat 阅读(5) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示