跳到正文

Karl_Aldrich

507387

已退役,有缘再见

在洛谷打开
资料、奖项与版本

资料

编号
507387
抓取

奖项

2024 CSP-J
三等奖
2024 CSP-S
二等奖
2023 CSP-J
二等奖

写代码日常:

『歌者』—Singer—\color{#2CA9E1}\mathsf{『歌者』}\\\scriptsize\mathsf{—Singer—} 『我看到了我的爱恋』—I see my love—\color{#2CA9E1}\mathsf{『我看到了我的爱恋』}\\\scriptsize\mathsf{—I\ see\ my\ love—} 『我飞到她的身边』—I fly next to her—\color{#2CA9E1}\mathsf{『我飞到她的身边』}\\\scriptsize\mathsf{—I\ fly\ next\ to\ her—} 『我捧出给她的礼物』—I present her with my gift—\color{#2CA9E1}\mathsf{『我捧出给她的礼物』}\\\scriptsize\mathsf{—I\ present\ her\ with\ my\ gift—} 『那是一小块凝固的时间』—A small piece of solidified time—\color{#2CA9E1}\mathsf{『那是一小块凝固的时间』}\\\scriptsize\mathsf{—A\ small\ piece\ of\ solidified\ time—} 『时间上有美丽的条纹』—Lovely markings are carved into time—\color{#2CA9E1}\mathsf{『时间上有美丽的条纹』}\\\scriptsize\mathsf{— Lovely\ markings\ are\ carved\ into\ time—} 『摸起来像浅海的泥一样柔软』—As soft to the touch as the mud in shallow sea—\color{#2CA9E1}\mathsf{『摸起来像浅海的泥一样柔软』}\\\scriptsize\mathsf{—As\ soft\ to\ the\ touch\ as\ the\ mud\ in\ shallow\ sea—} 『她把时间涂满全身』—She covers her body with time—\color{#E4671E}\mathsf{『她把时间涂满全身』}\\\scriptsize\mathsf{—She\ covers\ her\ body\ with\ time—} 『然后拉起我飞向存在的边缘』—And pulls me along to fly to the edge of existence—\color{#E4671E}\mathsf{『然后拉起我飞向存在的边缘』}\\\scriptsize\mathsf{—And\ pulls\ me\ along\ to\ fly\ to\ the\ edge\ of\ existence—} 『这是灵态的飞行』—This is a spiritual flight—\color{#E4671E}\mathsf{『这是灵态的飞行』}\\\scriptsize\mathsf{—This\ is\ a\ spiritual\ flight—} 『我们眼中的星星像幽灵』—In our eyes , the stars appear as ghosts—\color{#E4671E}\mathsf{『我们眼中的星星像幽灵』}\\\scriptsize\mathsf{—In\ our\ eyes\ ,\ the\ stars\ appear\ as\ ghosts—} 『星星眼中的我们也像幽灵』—In the eyes of the stars , we appear as ghosts—\color{#E4671E}\mathsf{『星星眼中的我们也像幽灵』}\\\scriptsize\mathsf{—In\ the\ eyes\ of\ the\ stars\ ,\ we\ appear\ as\ ghosts—}
THE  END2024  11  22\mathsf{THE \ \ END}\\\scriptsize\mathsf{2024\ \ 11\ \ 22}
共 1 篇
  1. 个人记录

    LZOI4591

    该文本描述了一种通过线段树优化区间判断的方法。核心思路是:当某个区间[l,r]的总人数(sum(val_i) -k)超过k*(r-l+1 +d)时不可行。为避免逐个区间检查导致的超时,采用线段树维护最大子段和,每次修改后仅需判断根节点的最大子段和是否超过k*d,若超过则输出NO,否则输出YES。代码实现中,线段树的每个节点存储区间总和、左最大子段和、右最大子段和及最大值,通过递归构建和更新,高效处理区间查询问题。