会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
Small_X's blog
蒟蒻の小窝 (该博客大部分内容同步发布在洛谷、CSDN)
博客园
首页
新随笔
联系
订阅
管理
2024年9月6日
题解:SP3693 KGSS - Maximum Sum
摘要: 原题传送门 思路分析 线段树。 这道题让我们进行两种操作,分别是单点修改和区间查询,结合数据范围,很明显是一道线段树。 区间里最大的 \(A_i+A_j\),其实就是求区间里的最大值和次大值,我们用线段树维护最大值和次大值。 建树 void build(int now,int tl,int tr){
阅读全文
posted @ 2024-09-06 21:19 shimingxin1007
阅读(4)
评论(0)
推荐(0)
编辑
公告