Loading

摘要: D-query 区间内,有多少个不同的数 莫队 模板题 #include <iostream> #include <cstdio> #include <algorithm> #include <cmath> using namespace std; #define endl '\n' const i 阅读全文
posted @ 2022-05-23 21:18 dgsvygd 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 蒲公英 求区间众数 分块 用的蓝书法二做的:预处理每个区间的最大众数,然后二分检查更新答案,同时更新边角的答案,记得分块的数量的是 $\sqrt{m * log_{2}n}$ 这个代码过不了 acwing 的:https://www.acwing.com/problem/content/251/ # 阅读全文
posted @ 2022-05-23 20:51 dgsvygd 阅读(24) 评论(0) 推荐(0) 编辑
摘要: Little Elephant and Array 区间内,数值为 x 的数出现了 x 次的有多少个 莫队 模板题 #include <iostream> #include <cstdio> #include <algorithm> #include <cmath> using namespace 阅读全文
posted @ 2022-05-23 20:43 dgsvygd 阅读(16) 评论(0) 推荐(0) 编辑
摘要: Sona 莫队 模板题 多组输入 #include <iostream> #include <cstdio> #include <algorithm> #include <vector> #include <string> #include <queue> #include <functional> 阅读全文
posted @ 2022-05-23 20:41 dgsvygd 阅读(40) 评论(0) 推荐(0) 编辑