08 2023 档案

摘要:### [题目传送门](https://www.luogu.com.cn/problem/P6105) ## solution 妙妙题。 分成 a+bC 和 $a+b using namespace std; const int N = 5e5+7; multiset num,ans; 阅读全文
posted @ 2023-08-03 21:51 Larunatrecy 阅读(28) 评论(0) 推荐(0) 编辑
摘要:### [题目传送门](https://www.luogu.com.cn/problem/P4689) ## soltion 简单题 换根显然可以拆成 O(1) 个区间,这里先不管。 直接做法是莫队,把双子树拆成 dfs 序上的双前缀,可以直接莫队,但是常数比较大。 另一种做法是根分,对颜色 阅读全文
posted @ 2023-08-03 21:44 Larunatrecy 阅读(23) 评论(0) 推荐(0) 编辑
摘要:### [题目传送门](https://www.luogu.com.cn/problem/P5524) ## solution 简单题。 我们正着做扫描线。 设 ti 表示位置 i 最后一次进行二操作的时间,那么一操作就是交换 tx,ty ,二操作就是区间复制。 对于三操作,开一个 阅读全文
posted @ 2023-08-03 21:38 Larunatrecy 阅读(43) 评论(0) 推荐(0) 编辑
摘要:总会有明月,回应你我的期盼! 阅读全文
posted @ 2023-08-02 19:19 Larunatrecy 阅读(40) 评论(0) 推荐(0) 编辑
摘要:### [题目传送门](https://www.luogu.com.cn/problem/P8512) ## solution 简单题,考虑正着做扫描线,维护最后一次覆盖每个位置的修改时间,这个可以用 set 维护颜色段数均摊。 那么显然对于一个以当前位置为右端点的询问,其答案就是所有最后修改时 阅读全文
posted @ 2023-08-02 19:17 Larunatrecy 阅读(31) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示
主题色彩